public final class CommonNavigatorManager extends Object implements ISelectionChangedListener
Manages the non-viewer responsibilities of the Common Navigator View Part, including the display and population of the context menu and the registration of extensions for opening content.
| Constructor and Description |
|---|
CommonNavigatorManager(CommonNavigator aNavigator)
Adds listeners to aNavigator to listen for selection changes and respond
to mouse events.
|
CommonNavigatorManager(CommonNavigator aNavigator,
IMemento aMemento)
Adds listeners to aNavigator to listen for selection changes and respond
to mouse events.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Called by
CommonNavigator when the View Part is disposed. |
protected void |
fillContextMenu(IMenuManager aMenuManager)
Fills aMenuManager with menu contributions from the
NavigatorActionService. |
NavigatorActionService |
getNavigatorActionService() |
protected void |
initContextMenu()
Initializes and registers the context menu.
|
protected void |
initViewMenu() |
void |
restoreState(IMemento aMemento) |
void |
saveState(IMemento aMemento) |
void |
selectionChanged(SelectionChangedEvent anEvent)
Notifies that the selection has changed.
|
protected void |
updateStatusBar(ISelection aSelection) |
public CommonNavigatorManager(CommonNavigator aNavigator)
Adds listeners to aNavigator to listen for selection changes and respond to mouse events.
aNavigator - The CommonNavigator managed by this class. Requires a non-null
value.public CommonNavigatorManager(CommonNavigator aNavigator, IMemento aMemento)
Adds listeners to aNavigator to listen for selection changes and respond to mouse events.
aNavigator - The CommonNavigator managed by this class. Requires a non-null
value.aMemento - a memento for restoring state, or nullpublic void dispose()
Called by CommonNavigator when the View Part is disposed.
public void selectionChanged(SelectionChangedEvent anEvent)
ISelectionChangedListenerselectionChanged in interface ISelectionChangedListeneranEvent - An event indicating the current selection of the
CommonViewerISelectionChangedListener.selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)public void restoreState(IMemento aMemento)
aMemento - Used to restore state of action extensions via the
NavigatorActionService.public void saveState(IMemento aMemento)
aMemento - Used to save state of action extensions via the
NavigatorActionService.protected void fillContextMenu(IMenuManager aMenuManager)
Fills aMenuManager with menu contributions from the
NavigatorActionService.
aMenuManager - A popup menuNavigatorActionService.fillContextMenu(IMenuManager)protected void initContextMenu()
Initializes and registers the context menu.
protected void initViewMenu()
protected void updateStatusBar(ISelection aSelection)
aSelection - The current selection from the CommonViewerpublic NavigatorActionService getNavigatorActionService()
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.