Class ValidateEditChecker
java.lang.Object
org.eclipse.ltk.core.refactoring.participants.ValidateEditChecker
- All Implemented Interfaces:
IConditionChecker
A validate edit checker is a shared checker to collect files
to be validated all at once. A validate edit checker checks
if the files are in sync with the underlying files system.
Additionally
IWorkspace#validateEdit
is called for
all read-only resources.
Note: Since 3.2, a ResourceChangeChecker
exists. If clients
add their changed files to the ResourceChangeChecker
there is no need to add them to a validate edit checker as
well. Files marked as changed in the resource operation checker
will be automatically added to a validate edit checker (if one
exists).
Note: this class is not intended to be extended by clients.
- Since:
- 3.0
- See Also:
- Restriction:
- This class is not intended to be subclassed by clients.
-
Constructor Summary
ConstructorDescriptionValidateEditChecker
(Object context) The context passed to the validate edit call. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given file to this checker.void
Adds the given array of files.check
(IProgressMonitor monitor) Performs the actual condition checking.
-
Constructor Details
-
ValidateEditChecker
The context passed to the validate edit call.- Parameters:
context
- theorg.eclipse.swt.widgets.Shell
that is to be used to parent any dialogs with the user, ornull
if there is no UI context (declared as anObject
to avoid any direct references on the SWT component)- See Also:
-
-
Method Details
-
addFile
Adds the given file to this checker.- Parameters:
file
- the file to add
-
addFiles
Adds the given array of files.- Parameters:
files
- the array of files to add
-
check
Description copied from interface:IConditionChecker
Performs the actual condition checking.- Specified by:
check
in interfaceIConditionChecker
- Parameters:
monitor
- a progress monitor to report progress- Returns:
- the outcome of the condition check
- Throws:
CoreException
- if an error occurred during condition checking. The check is interpreted as failed if this happens
-