Class CompareContainer
- All Implemented Interfaces:
- ICompareContainer,- IRunnableContext
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddCompareInputChangeListener(ICompareInput input, ICompareInputChangeListener listener) Register for change events for the given compare input.protected WorkerJobReturn the action bars for the container ornullif the container does not have an action bars.Return theICompareNavigatorassociated with this container ornullif the container does not have a global navigator.Return the service locator for the container ornullif the container does not have one.Return the workbench part associated with this container ornullif there is no part or it is not available.protected StringvoidregisterContextMenu(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.voidremoveCompareInputChangeListener(ICompareInput input, ICompareInputChangeListener listener) Remove the change listener from the given compare input.voidrun(boolean fork, boolean cancelable, IRunnableWithProgress runnable) Runs the givenIRunnableWithProgressin this context.voidrunAsynchronously(IRunnableWithProgress runnable) Queue the given task to be run asynchronously.voidsetStatusMessage(String message) Set the status message displayed by the container to the given message
- 
Constructor Details- 
CompareContainerpublic CompareContainer()
 
- 
- 
Method Details- 
setStatusMessageDescription copied from interface:ICompareContainerSet the status message displayed by the container to the given message- Specified by:
- setStatusMessagein interface- ICompareContainer
- Parameters:
- message- the status message
 
- 
addCompareInputChangeListenerpublic void addCompareInputChangeListener(ICompareInput input, ICompareInputChangeListener listener) Description copied from interface:ICompareContainerRegister 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.- Specified by:
- addCompareInputChangeListenerin interface- ICompareContainer
- Parameters:
- input- the compare input
- listener- the compare input change listener
 
- 
removeCompareInputChangeListenerpublic void removeCompareInputChangeListener(ICompareInput input, ICompareInputChangeListener listener) Description copied from interface:ICompareContainerRemove the change listener from the given compare input. Removing a listener that is not registered has no effect.- Specified by:
- removeCompareInputChangeListenerin interface- ICompareContainer
- Parameters:
- input- the compare input
- listener- the compare input change listener
 
- 
registerContextMenuDescription copied from interface:ICompareContainerRegister 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_ADDITIONSseparator as this is where the container will add actions.- Specified by:
- registerContextMenuin interface- ICompareContainer
- Parameters:
- menu- the menu being registered
- selectionProvider- the selection provider
 
- 
getServiceLocatorDescription copied from interface:ICompareContainerReturn the service locator for the container ornullif the container does not have one.- Specified by:
- getServiceLocatorin interface- ICompareContainer
- Returns:
- the service locator for the container or null
 
- 
getActionBarsDescription copied from interface:ICompareContainerReturn the action bars for the container ornullif the container does not have an action bars.- Specified by:
- getActionBarsin interface- ICompareContainer
- Returns:
- the action bars for the container or null
 
- 
runpublic void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException Description copied from interface:IRunnableContextRuns the given IRunnableWithProgressin this context. For example, if this is aProgressMonitorDialogthen the runnable is run using this dialog's progress monitor.If forkisfalse, the current thread is used to run the runnable. Note that ifforkistrue, it is unspecified whether or not this method blocks until the runnable has been run. Implementers should document whether the runnable is run synchronously (blocking) or asynchronously (non-blocking), or if no assumption can be made about the blocking behaviour.- Specified by:
- runin interface- IRunnableContext
- Parameters:
- fork-- trueif the runnable should be run in a separate thread, and- falseto run in the same thread
- cancelable-- trueto enable the cancelation, and- falseto make the operation uncancellable
- runnable- the runnable to run
- Throws:
- InvocationTargetException- wraps any exception or error which occurs while running the runnable
- InterruptedException- propagated by the context if the runnable acknowledges cancelation by throwing this exception. This should not be thrown if cancelable is- false.
 
- 
runAsynchronouslyDescription copied from interface:ICompareContainerQueue 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. - Specified by:
- runAsynchronouslyin interface- ICompareContainer
- Parameters:
- runnable- the task to be performed
 
- 
createWorkerJob
- 
getWorkerJobName
- 
getWorkbenchPartDescription copied from interface:ICompareContainerReturn the workbench part associated with this container ornullif there is no part or it is not available.- Specified by:
- getWorkbenchPartin interface- ICompareContainer
- Returns:
- the workbench part associated with this container or
 null
 
 
-