public class SaveDirtyFilesRule extends ValidateEditRule
addAffectedFiles()
methods. These (static) methods can be called
multiple times to add files to the set of affected files maintained by the
rule. The list of files is stored in the context.
This rule should not be added to a ModelTransform
. Doing so
could result in a deadlock.
Constructor and Description |
---|
SaveDirtyFilesRule() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
createTarget(ITransformContext context)
Ensure the files to be affected (extracted from the context) can
be modified.
|
protected void |
verifySaveDirtyFilesStatus(ITransformContext context,
java.util.Set<org.eclipse.ui.IEditorPart> dirtyEditors)
This method will prompt user to save dirty resources before transformation can continue.
|
addAffectedFile, addAffectedFiles, getAffectedFiles, reportError
execute, findTarget, isSourceConsumed, mapTarget, toString, updateTarget
canAccept, getAcceptCondition, getDescription, getId, getName, getProgressMonitor, setAcceptCondition, setDescription, setId, setName
protected java.lang.Object createTarget(ITransformContext context) throws java.lang.Exception
ValidateEditRule
createTarget
in class ValidateEditRule
context
- the current context of the transformation executionjava.lang.Exception
protected void verifySaveDirtyFilesStatus(ITransformContext context, java.util.Set<org.eclipse.ui.IEditorPart> dirtyEditors)
context
- dirtyEditors
-