public class ValidateEditRule extends AbstractRule
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 |
---|
ValidateEditRule()
The default constructor should only be used internally by the
transformation service.
|
ValidateEditRule(java.lang.String id,
java.lang.String name)
Construct a validate edit rule with an id and name.
|
Modifier and Type | Method and Description |
---|---|
static void |
addAffectedFile(ITransformContext context,
org.eclipse.core.resources.IFile file)
Add a file to the list of affected files.
|
static void |
addAffectedFiles(ITransformContext context,
java.util.List fileList)
Add the given files to the list of affected files.
|
protected java.lang.Object |
createTarget(ITransformContext context)
Ensure the files to be affected (extracted from the context) can
be modified.
|
protected static java.util.HashSet |
getAffectedFiles(ITransformContext context)
Get the list of affected files from the context.
|
protected void |
reportError(org.eclipse.core.runtime.IStatus status,
ITransformContext context)
Process error that occured during file validation.
|
execute, findTarget, isSourceConsumed, mapTarget, toString, updateTarget
canAccept, getAcceptCondition, getDescription, getId, getName, getProgressMonitor, setAcceptCondition, setDescription, setId, setName
public ValidateEditRule()
public ValidateEditRule(java.lang.String id, java.lang.String name)
id
- A unique identifier for the rule.name
- The name of the rule.public static void addAffectedFile(ITransformContext context, org.eclipse.core.resources.IFile file)
context
- the current context of the transformation executionfile
- A file that will be created or modified by the transform.public static void addAffectedFiles(ITransformContext context, java.util.List fileList)
context
- the current context of the transformation executionfileList
- a list of files (of type IFile)that will be created or modified by the transform.protected static java.util.HashSet getAffectedFiles(ITransformContext context)
context
- the current context of the transformation executionprotected java.lang.Object createTarget(ITransformContext context) throws java.lang.Exception
createTarget
in class AbstractRule
context
- the current context of the transformation executionjava.lang.Exception
protected void reportError(org.eclipse.core.runtime.IStatus status, ITransformContext context)
status
- - file validation statuscontext
- - the current context of the transformation execution