public class CheckConditionsContext extends Object
The context manages a set of IConditionChecker
objects to collect
condition checks that should be perform across all participants and the
processor. For example validating if a file can be changed (see
IWorkspace.validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)
should only be called once for all files modified by the processor and all
participants.
Note: this class is not intended to be extended by clients.
Constructor and Description |
---|
CheckConditionsContext() |
Modifier and Type | Method and Description |
---|---|
void |
add(IConditionChecker checker)
Adds the given condition checker.
|
RefactoringStatus |
check(IProgressMonitor pm)
Checks the condition of all registered condition checkers and returns a
merge status result.
|
<T extends IConditionChecker> |
getChecker(Class<T> clazz)
Returns the condition checker of the given type.
|
public <T extends IConditionChecker> T getChecker(Class<T> clazz)
clazz
- the type of the condition checkernull
if
no checker is registered for the given typepublic void add(IConditionChecker checker) throws CoreException
checker
- the checker to addCoreException
- if a checker of the same type already
existspublic RefactoringStatus check(IProgressMonitor pm) throws CoreException
pm
- a progress monitor or null
if no progress
reporting is desiredCoreException
- if an error occurs during condition checking
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.