Class ValidateEditChecker
- java.lang.Object
-
- org.eclipse.ltk.core.refactoring.participants.ValidateEditChecker
-
- All Implemented Interfaces:
IConditionChecker
public class ValidateEditChecker extends Object implements 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. AdditionallyIWorkspace#validateEditis called for all read-only resources.Note: Since 3.2, a
ResourceChangeCheckerexists. If clients add their changed files to theResourceChangeCheckerthere 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:
IWorkspace.validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description ValidateEditChecker(Object context)The context passed to the validate edit call.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFile(IFile file)Adds the given file to this checker.voidaddFiles(IFile[] files)Adds the given array of files.RefactoringStatuscheck(IProgressMonitor monitor)Performs the actual condition checking.
-
-
-
Constructor Detail
-
ValidateEditChecker
public ValidateEditChecker(Object context)
The context passed to the validate edit call.- Parameters:
context- theorg.eclipse.swt.widgets.Shellthat is to be used to parent any dialogs with the user, ornullif there is no UI context (declared as anObjectto avoid any direct references on the SWT component)- See Also:
IWorkspace.validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)
-
-
Method Detail
-
addFile
public void addFile(IFile file)
Adds the given file to this checker.- Parameters:
file- the file to add
-
addFiles
public void addFiles(IFile[] files)
Adds the given array of files.- Parameters:
files- the array of files to add
-
check
public RefactoringStatus check(IProgressMonitor monitor) throws CoreException
Description copied from interface:IConditionCheckerPerforms the actual condition checking.- Specified by:
checkin 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
-
-