|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.wst.validation.AbstractValidator
public abstract class AbstractValidator
The class that all Validators that wish to use version two of the validation framework must subclass.
Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Constructor Summary | |
---|---|
AbstractValidator()
|
Method Summary | |
---|---|
void |
clean(IProject project,
ValidationState state,
IProgressMonitor monitor)
A call back method that lets the validator know that the project is being cleaned. |
Validator.V2 |
getParent()
Answer the validator that you belong to. |
boolean |
shouldClearMarkers(ValidationEvent event)
Should the validation framework first clear the markers that this validator has placed on this resource? |
ValidationResult |
validate(IResource resource,
int kind,
ValidationState state,
IProgressMonitor monitor)
Validate the resource. |
ValidationResult |
validate(ValidationEvent event,
ValidationState state,
IProgressMonitor monitor)
Validate the resource. |
void |
validationFinishing(IProject project,
ValidationState state,
IProgressMonitor monitor)
This method will be called when validation is complete. |
void |
validationStarting(IProject project,
ValidationState state,
IProgressMonitor monitor)
This method is called before any validation takes place. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractValidator()
Method Detail |
---|
public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor)
If you override this method then you should not override the other validate method.
resource
- The resource to be validated.kind
- The way the resource changed. It uses the same values as the kind
parameter in IResourceDelta.state
- A way to pass arbitrary, validator specific, data from one
invocation of a validator to the next, during the validation phase.
At the end of the validation phase, this object will be cleared,
thereby allowing any of this state information to be garbaged
collected.monitor
- A monitor that you can use to report your progress. To be a well
behaved validator you need to check the isCancelled() method at
appropriate times.
public ValidationResult validate(ValidationEvent event, ValidationState state, IProgressMonitor monitor)
If you override this method then you should not override the other validate method.
event
- An object that describes the resource to be validated and why
it should be validated.state
- A way to pass arbitrary, validator specific, data from one
invocation of a validator to the next, during the validation
phase. At the end of the validation phase, this object will be
cleared, thereby allowing any of this state information to be
garbaged collected.monitor
- A monitor that you can use to report your progress. To be a
well behaved validator you need to check the isCancelled()
method at appropriate times.
public void clean(IProject project, ValidationState state, IProgressMonitor monitor)
If the entire workspace is being cleaned, then the first call will have a null project, and then there will be subsequent calls for each open project in the workspace.
project
- The project being cleaned. This may be null, which is an indication
that the workspace is being cleaned.state
- A way to pass arbitrary, validator specific, data from one
invocation of a validator to the next, during the validation phase.monitor
- The monitor that should be used for reporting progress if the clean
takes a long time.public void validationStarting(IProject project, ValidationState state, IProgressMonitor monitor)
project
- The project that is being validated. For the very first call in the
validation phase, this will be null. A null project is the signal
that a top level validation is starting. Subsequently, the project
will be set, as each of the individual projects are validated.state
- A way to pass arbitrary, validator specific, data from one
invocation of a validator to the next, during the validation phase.monitor
- The monitor that should be used for reporting progress if the initialization
takes a long time.public void validationFinishing(IProject project, ValidationState state, IProgressMonitor monitor)
project
- The project that was validated. The very last call in the validation
sets this to null so that the validator knows that all the
projects have now been validated.state
- A way to pass arbitrary, validator specific, data from one
invocation of a validator to the next, during the validation phase.monitor
- The monitor that should be used for reporting progress if the cleanup
takes a long time.public boolean shouldClearMarkers(ValidationEvent event)
event
- The validation event that triggered the validation.
public Validator.V2 getParent()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |