org.eclipse.cdt.internal.ui.cview
Class MainActionGroup

java.lang.Object
  extended by org.eclipse.ui.actions.ActionGroup
      extended by org.eclipse.cdt.internal.ui.cview.CViewActionGroup
          extended by org.eclipse.cdt.internal.ui.cview.MainActionGroup

public class MainActionGroup
extends CViewActionGroup

The main action group for the cview. This contains a few actions and several subgroups.


Constructor Summary
MainActionGroup(CView cview)
           
 
Method Summary
 void dispose()
           
 void fillActionBars(org.eclipse.ui.IActionBars actionBars)
           
 void fillContextMenu(org.eclipse.jface.action.IMenuManager menu)
          Called when the context menu is about to open.
 CustomFiltersActionGroup getCustomFilterActionGroup()
           
 void handleKeyPressed(org.eclipse.swt.events.KeyEvent event)
          Handles key events in viewer.
 void handleKeyReleased(org.eclipse.swt.events.KeyEvent event)
          Handles key events in viewer.
 void restoreFilterAndSorterState(org.eclipse.ui.IMemento memento)
           
 void runDefaultAction(org.eclipse.jface.viewers.IStructuredSelection selection)
          Runs the default action in the group.
 void saveFilterAndSorterState(org.eclipse.ui.IMemento memento)
           
 void setContext(org.eclipse.ui.actions.ActionContext context)
          Extends the superclass implementation to set the context in the subgroups.
 void updateActionBars()
          Updates all actions with the given selection.
 
Methods inherited from class org.eclipse.cdt.internal.ui.cview.CViewActionGroup
getCView
 
Methods inherited from class org.eclipse.ui.actions.ActionGroup
getContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainActionGroup

public MainActionGroup(CView cview)
Method Detail

handleKeyPressed

public void handleKeyPressed(org.eclipse.swt.events.KeyEvent event)
Handles key events in viewer.

Overrides:
handleKeyPressed in class CViewActionGroup

handleKeyReleased

public void handleKeyReleased(org.eclipse.swt.events.KeyEvent event)
Handles key events in viewer.

Overrides:
handleKeyReleased in class CViewActionGroup

fillContextMenu

public void fillContextMenu(org.eclipse.jface.action.IMenuManager menu)
Called when the context menu is about to open. Override to add your own context dependent menu contributions.

Specified by:
fillContextMenu in class CViewActionGroup

setContext

public void setContext(org.eclipse.ui.actions.ActionContext context)
Extends the superclass implementation to set the context in the subgroups.

Overrides:
setContext in class org.eclipse.ui.actions.ActionGroup

runDefaultAction

public void runDefaultAction(org.eclipse.jface.viewers.IStructuredSelection selection)
Description copied from class: CViewActionGroup
Runs the default action in the group. Does nothing by default.

Overrides:
runDefaultAction in class CViewActionGroup
Parameters:
selection - the current selection

updateActionBars

public void updateActionBars()
Updates all actions with the given selection. Necessary when popping up a menu, because some of the enablement criteria may have changed, even if the selection in the viewer hasn't. E.g. A project was opened or closed.

Specified by:
updateActionBars in class CViewActionGroup

fillActionBars

public void fillActionBars(org.eclipse.ui.IActionBars actionBars)
Specified by:
fillActionBars in class CViewActionGroup

restoreFilterAndSorterState

public void restoreFilterAndSorterState(org.eclipse.ui.IMemento memento)
Overrides:
restoreFilterAndSorterState in class CViewActionGroup

saveFilterAndSorterState

public void saveFilterAndSorterState(org.eclipse.ui.IMemento memento)
Overrides:
saveFilterAndSorterState in class CViewActionGroup

getCustomFilterActionGroup

public CustomFiltersActionGroup getCustomFilterActionGroup()

dispose

public void dispose()
Overrides:
dispose in class org.eclipse.ui.actions.ActionGroup