Package org.eclipse.compare
Interface ICompareContainer
- All Superinterfaces:
IRunnableContext
- All Known Implementing Classes:
CompareContainer
,CompareEditorInput
,HistoryPageCompareEditorInput
,PageCompareEditorInput
,ParticipantPageCompareEditorInput
,SaveableCompareEditorInput
,SyncInfoCompareInput
A compare container is used to represent any UI that can contain compare viewers.
This interface is not intended to be implemented by clients.
- Since:
- 3.3
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCompareInputChangeListener
(ICompareInput input, ICompareInputChangeListener listener) Register for change events for the given compare input.Return the action bars for the container ornull
if the container does not have an action bars.Return theICompareNavigator
associated with this container ornull
if the container does not have a global navigator.Return the service locator for the container ornull
if the container does not have one.Return the workbench part associated with this container ornull
if there is no part or it is not available.void
registerContextMenu
(MenuManager menu, ISelectionProvider selectionProvider) Register the content menu with the container to give the container a chance to add additional items to the context menu such as popup menu object contributions.void
removeCompareInputChangeListener
(ICompareInput input, ICompareInputChangeListener listener) Remove the change listener from the given compare input.void
runAsynchronously
(IRunnableWithProgress runnable) Queue the given task to be run asynchronously.void
setStatusMessage
(String message) Set the status message displayed by the container to the given messageMethods inherited from interface org.eclipse.jface.operation.IRunnableContext
run
-
Method Details
-
addCompareInputChangeListener
Register for change events for the given compare input. Although clients can register with the compare input directly, registering through the container allows for deterministic and optimized behavior in some cases. Registering multiple times for the same compare input has no effect.- Parameters:
input
- the compare inputlistener
- the compare input change listener
-
removeCompareInputChangeListener
Remove the change listener from the given compare input. Removing a listener that is not registered has no effect.- Parameters:
input
- the compare inputlistener
- the compare input change listener
-
registerContextMenu
Register the content menu with the container to give the container a chance to add additional items to the context menu such as popup menu object contributions. The provided menu should have aIWorkbenchActionConstants.MB_ADDITIONS
separator as this is where the container will add actions.- Parameters:
menu
- the menu being registeredselectionProvider
- the selection provider
-
setStatusMessage
Set the status message displayed by the container to the given message- Parameters:
message
- the status message
-
getActionBars
IActionBars getActionBars()Return the action bars for the container ornull
if the container does not have an action bars.- Returns:
- the action bars for the container or
null
-
getServiceLocator
IServiceLocator getServiceLocator()Return the service locator for the container ornull
if the container does not have one.- Returns:
- the service locator for the container or
null
-
runAsynchronously
Queue the given task to be run asynchronously. If the given runnable was previously queued to run asynchronously and it has not yet run, the task position will be moved to the end of the queue. If the task that is being queued is currently running, the running task will be canceled and added to the end of the queue.This method should be treated as a request to run the given task asynchronously. However, clients should not assume that the code will be run asynchronously. Depending on the container implementation, a call to this method may or may not block the caller until the task is completed. Also, the task may be executed in a modal or non-modal fashion.
- Parameters:
runnable
- the task to be performed
-
getWorkbenchPart
IWorkbenchPart getWorkbenchPart()Return the workbench part associated with this container ornull
if there is no part or it is not available.- Returns:
- the workbench part associated with this container or
null
-