Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ltk.core.refactoring.participants
Class CheckConditionsContext  view CheckConditionsContext download CheckConditionsContext.java

java.lang.Object
  extended byorg.eclipse.ltk.core.refactoring.participants.CheckConditionsContext

public class CheckConditionsContext
extends java.lang.Object

A context that is shared between the refactoring processor and all its associated participants during condition checking.

The context manages a set of IConditionCheckerobjects 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)>IWorkspace.validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object) 55 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.

Since:
3.0

Field Summary
private  java.util.Map fCheckers
           
 
Constructor Summary
CheckConditionsContext()
           
 
Method Summary
 void add(IConditionChecker checker)
          Adds the given condition checker.
 org.eclipse.ltk.core.refactoring.RefactoringStatus check(org.eclipse.core.runtime.IProgressMonitor pm)
          Checks the condition of all registered condition checkers and returns a merge status result.
 IConditionChecker getChecker(java.lang.Class clazz)
          Returns the condition checker of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fCheckers

private java.util.Map fCheckers
Constructor Detail

CheckConditionsContext

public CheckConditionsContext()
Method Detail

getChecker

public IConditionChecker getChecker(java.lang.Class clazz)
Returns the condition checker of the given type.


add

public void add(IConditionChecker checker)
         throws org.eclipse.core.runtime.CoreException
Adds the given condition checker. An exception will be thrown if a checker of the same type already exists in this context.


check

public org.eclipse.ltk.core.refactoring.RefactoringStatus check(org.eclipse.core.runtime.IProgressMonitor pm)
                                                         throws org.eclipse.core.runtime.CoreException
Checks the condition of all registered condition checkers and returns a merge status result.