java.lang.Object | +--com.ibm.lab.soln.resources.WorkspaceSaveParticipant
Resource programming demonstration of the structure of a
participant in Workspace save events. Tied to logic in the plug-in's
startup()
method that adds a save participant to the workspace.
Tools that need to save project-specific information should consider using a save participant so that you can be notified when new projects are created and when changes that trigger a save event have occurred. This allows your tool logic to save any information that may be required to support the operation of your tool.
ISaveParticipant
,
ISaveContext
Constructor Summary | |
WorkspaceSaveParticipant()
Custom constructor to set an alternate prefix mode that will be used for console message tagging. |
Method Summary | |
void |
doneSaving(org.eclipse.core.resources.ISaveContext context)
Tells this participant that the workspace save operation is now complete and it is free to go about its normal business. |
void |
prepareToSave(org.eclipse.core.resources.ISaveContext context)
Tells this participant that the workspace is about to be saved. |
void |
rollback(org.eclipse.core.resources.ISaveContext context)
Tells this participant to rollback its important state. |
void |
saveFile(java.io.File f)
Tells this participant that the workspace is about to be saved. |
void |
saving(org.eclipse.core.resources.ISaveContext context)
Tells this participant that the workspace is about to be saved. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WorkspaceSaveParticipant()
Method Detail |
public void doneSaving(org.eclipse.core.resources.ISaveContext context)
doneSaving
in interface org.eclipse.core.resources.ISaveParticipant
context
- the save context objectISaveParticipant.doneSaving(org.eclipse.core.resources.ISaveContext)
public void prepareToSave(org.eclipse.core.resources.ISaveContext context) throws org.eclipse.core.runtime.CoreException
prepareToSave
in interface org.eclipse.core.resources.ISaveParticipant
context
- the save context objectorg.eclipse.core.runtime.CoreException
- if this method fails to snapshot
the state of this workspaceISaveParticipant.prepareToSave(org.eclipse.core.resources.ISaveContext)
public void rollback(org.eclipse.core.resources.ISaveContext context)
rollback
in interface org.eclipse.core.resources.ISaveParticipant
context
- the save context objectISaveParticipant.rollback(org.eclipse.core.resources.ISaveContext)
,
ISaveContext.getPreviousSaveNumber()
public void saveFile(java.io.File f) throws org.eclipse.core.runtime.CoreException
public void saving(org.eclipse.core.resources.ISaveContext context) throws org.eclipse.core.runtime.CoreException
saving
in interface org.eclipse.core.resources.ISaveParticipant
context
- the save context objectorg.eclipse.core.runtime.CoreException
- if this method fails to snapshot
the state of this workspaceISaveParticipant.saving(org.eclipse.core.resources.ISaveContext)