Class RefactoringHistoryEvent
java.lang.Object
org.eclipse.ltk.core.refactoring.history.RefactoringHistoryEvent
Event object to communicate refactoring history notifications. These include
the addition and removal of refactoring descriptors to the global refactoring
history index.
Refactoring history 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:
- Restriction:
- This class is not intended to be instantiated by clients.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Event type indicating that a refactoring descriptor has been added to its associated history (value 4)static final int
Event type indicating that a refactoring descriptor has been deleted from its associated history (value 3)static final int
Event type indicating that a refactoring descriptor has been popped from the history stack (value 2)static final int
Event type indicating that a refactoring descriptor has been pushed to the history stack (value 1) -
Constructor Summary
ConstructorDescriptionRefactoringHistoryEvent
(IRefactoringHistoryService service, int type, RefactoringDescriptorProxy proxy) Creates a new refactoring history event. -
Method Summary
Modifier and TypeMethodDescriptionReturns the refactoring descriptor proxy.int
Returns the event type.Returns the refactoring history service.
-
Field Details
-
ADDED
public static final int ADDEDEvent type indicating that a refactoring descriptor has been added to its associated history (value 4)- See Also:
-
DELETED
public static final int DELETEDEvent type indicating that a refactoring descriptor has been deleted from its associated history (value 3)- See Also:
-
POPPED
public static final int POPPEDEvent type indicating that a refactoring descriptor has been popped from the history stack (value 2)- See Also:
-
PUSHED
public static final int PUSHEDEvent type indicating that a refactoring descriptor has been pushed to the history stack (value 1)- See Also:
-
-
Constructor Details
-
RefactoringHistoryEvent
public RefactoringHistoryEvent(IRefactoringHistoryService service, int type, RefactoringDescriptorProxy proxy) Creates a new refactoring history event.- Parameters:
service
- the refactoring history servicetype
- the event typeproxy
- the refactoring descriptor proxy
-
-
Method Details
-
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
Returns the refactoring history service.- Returns:
- the refactoring history service
-