Package org.eclipse.ui.navigator
Class CommonNavigatorManager
- java.lang.Object
-
- org.eclipse.ui.navigator.CommonNavigatorManager
-
- All Implemented Interfaces:
ISelectionChangedListener
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.
- Since:
- 3.4
- Restriction:
- This class is not intended to be instantiated by clients.
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Called byCommonNavigator
when the View Part is disposed.protected void
fillContextMenu(IMenuManager aMenuManager)
Fills aMenuManager with menu contributions from theNavigatorActionService
.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)
-
-
-
Constructor Detail
-
CommonNavigatorManager
public CommonNavigatorManager(CommonNavigator aNavigator)
Adds listeners to aNavigator to listen for selection changes and respond to mouse events.
- Parameters:
aNavigator
- The CommonNavigator managed by this class. Requires a non-null value.
-
CommonNavigatorManager
public CommonNavigatorManager(CommonNavigator aNavigator, IMemento aMemento)
Adds listeners to aNavigator to listen for selection changes and respond to mouse events.
- Parameters:
aNavigator
- The CommonNavigator managed by this class. Requires a non-null value.aMemento
- a memento for restoring state, ornull
-
-
Method Detail
-
dispose
public void dispose()
Called by
CommonNavigator
when the View Part is disposed.
-
selectionChanged
public void selectionChanged(SelectionChangedEvent anEvent)
Description copied from interface:ISelectionChangedListener
Notifies that the selection has changed.- Specified by:
selectionChanged
in interfaceISelectionChangedListener
- Parameters:
anEvent
- An event indicating the current selection of theCommonViewer
- See Also:
ISelectionChangedListener.selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
-
restoreState
public void restoreState(IMemento aMemento)
- Parameters:
aMemento
- Used to restore state of action extensions via theNavigatorActionService
.
-
saveState
public void saveState(IMemento aMemento)
- Parameters:
aMemento
- Used to save state of action extensions via theNavigatorActionService
.
-
fillContextMenu
protected void fillContextMenu(IMenuManager aMenuManager)
Fills aMenuManager with menu contributions from the
NavigatorActionService
.- Parameters:
aMenuManager
- A popup menu- See Also:
NavigatorActionService.fillContextMenu(IMenuManager)
-
initContextMenu
protected void initContextMenu()
Initializes and registers the context menu.
-
initViewMenu
protected void initViewMenu()
-
updateStatusBar
protected void updateStatusBar(ISelection aSelection)
- Parameters:
aSelection
- The current selection from theCommonViewer
-
getNavigatorActionService
public NavigatorActionService getNavigatorActionService()
- Returns:
- The action service used by this manager
-
-