Class RefactoringExecutionEvent
- java.lang.Object
-
- org.eclipse.ltk.core.refactoring.history.RefactoringExecutionEvent
-
public final class RefactoringExecutionEvent extends Object
Event object to communicate refactoring execution notifications. These include before-the-fact notification of perform, undo and redo refactoring operations as well as after-the-fact notification of the above refactoring operations.Refactoring execution listeners must be prepared to receive notifications from a background thread. Any UI access occurring inside the implementation must be properly synchronized using the techniques specified by the client's widget library.
Note: this class is not intended to be instantiated by clients.
- Since:
- 3.2
- See Also:
IRefactoringExecutionListener,IRefactoringHistoryService- Restriction:
- This class is not intended to be instantiated by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static intABOUT_TO_PERFORMEvent type indicating that a refactoring is about to be performed (value 4)static intABOUT_TO_REDOEvent type indicating that a refactoring is about to be redone (value 6)static intABOUT_TO_UNDOEvent type indicating that a refactoring is about to be undone (value 5)static intPERFORMEDEvent type indicating that a refactoring has been performed (value 1)static intREDONEEvent type indicating that a refactoring has been performed (value 3)static intUNDONEEvent type indicating that a refactoring has been undone (value 2)
-
Constructor Summary
Constructors Constructor Description RefactoringExecutionEvent(IRefactoringHistoryService service, int type, RefactoringDescriptorProxy proxy)Creates a new refactoring execution event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RefactoringDescriptorProxygetDescriptor()Returns the refactoring descriptor proxy.intgetEventType()Returns the event type.IRefactoringHistoryServicegetHistoryService()Returns the refactoring history service
-
-
-
Field Detail
-
ABOUT_TO_PERFORM
public static final int ABOUT_TO_PERFORM
Event type indicating that a refactoring is about to be performed (value 4)- See Also:
- Constant Field Values
-
ABOUT_TO_REDO
public static final int ABOUT_TO_REDO
Event type indicating that a refactoring is about to be redone (value 6)- See Also:
- Constant Field Values
-
ABOUT_TO_UNDO
public static final int ABOUT_TO_UNDO
Event type indicating that a refactoring is about to be undone (value 5)- See Also:
- Constant Field Values
-
PERFORMED
public static final int PERFORMED
Event type indicating that a refactoring has been performed (value 1)- See Also:
- Constant Field Values
-
REDONE
public static final int REDONE
Event type indicating that a refactoring has been performed (value 3)- See Also:
- Constant Field Values
-
UNDONE
public static final int UNDONE
Event type indicating that a refactoring has been undone (value 2)- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RefactoringExecutionEvent
public RefactoringExecutionEvent(IRefactoringHistoryService service, int type, RefactoringDescriptorProxy proxy)
Creates a new refactoring execution event.- Parameters:
service- the refactoring history servicetype- the event typeproxy- the refactoring descriptor proxy
-
-
Method Detail
-
getDescriptor
public RefactoringDescriptorProxy getDescriptor()
Returns the refactoring descriptor proxy.Depending on the event, this proxy may refer to an inexisting refactoring and cannot be resolved to a refactoring descriptor. Clients should also be prepared to receive notifications for unknown refactorings, which are discriminated by their special id
RefactoringDescriptor.ID_UNKNOWN;- Returns:
- the refactoring descriptor proxy
-
getEventType
public int getEventType()
Returns the event type.- Returns:
- the event type
-
getHistoryService
public IRefactoringHistoryService getHistoryService()
Returns the refactoring history service- Returns:
- the refactoring history service
-
-