RSE
Release 1.0

org.eclipse.rse.ui.actions
Class SystemSubMenuManagerForTesting

java.lang.Object
  extended byorg.eclipse.jface.action.ContributionManager
      extended byorg.eclipse.jface.action.MenuManager
          extended byorg.eclipse.rse.ui.actions.SystemSubMenuManager
              extended byorg.eclipse.rse.ui.actions.SystemSubMenuManagerForTesting
All Implemented Interfaces:
IContributionItem, IContributionManager, IMenuManager

public class SystemSubMenuManagerForTesting
extends SystemSubMenuManager

For cascading menus, we need our own menu subclass so we can intercept the state-setting methods our frameworks, and foreword those onto the sub-menu actions.

The state-setting methods including setShell, setSelection and setValue.

We often have trouble tracking down when the shell, selection and viewer is not properly set for cascading actions. For these cases, we can use this override of the SystemSubMenuManager to trace what happens.


Field Summary
 
Fields inherited from class org.eclipse.rse.ui.actions.SystemSubMenuManager
deferPopulation, image, label, parentCascadingAction, selection, shell, toolTipText, traceSelections, traceTarget, viewer
 
Constructor Summary
SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction)
          Constructor
SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction, String text)
          Constructor
SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction, String text, String id)
          Constructor
SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction, String text, String id, ImageDescriptor image)
          Constructor
 
Method Summary
 void add(IContributionItem item)
          Intercept so we can cascade the selection, viewer and shell down
 void appendToGroup(String groupName, IAction action)
          Intercept so we can cascade the selection, viewer and shell down
 void appendToGroup(String groupName, IContributionItem item)
          Intercept so we can cascade the selection, viewer and shell down
protected  void cascadeAllInputs()
          Cascade in one shot all input state inputs to all actions
protected  void cascadeAllInputs(ISystemAction action)
          Cascade in one shot all input state inputs to one action
protected  void cascadeAllInputs(SystemSubMenuManager submenu)
          Cascade in one shot all input state inputs to one submenu
 void setInputs(Shell shell, Viewer v, ISelection selection)
          Override of parent so we can trace it....
 
Methods inherited from class org.eclipse.rse.ui.actions.SystemSubMenuManager
getLabel, getParentCascadingAction, getSelection, getShell, getToolTipText, getViewer, issueTraceMessage, setSelection, setShell, setToolTipText, setTracing, setTracing, setTracing, setViewer
 
Methods inherited from class org.eclipse.jface.action.MenuManager
addMenuListener, createContextMenu, createMenuBar, createMenuBar, dispose, fill, fill, fill, fill, findMenuUsingPath, findUsingPath, getId, getMenu, getMenuText, getOverrides, getParent, getRemoveAllWhenShown, isDynamic, isEnabled, isGroupMarker, isSeparator, isSubstituteFor, isVisible, markDirty, removeMenuListener, saveWidgetState, setOverrides, setParent, setRemoveAllWhenShown, setVisible, update, update, update, update, updateAll
 
Methods inherited from class org.eclipse.jface.action.ContributionManager
add, allowItem, dumpStatistics, find, getItems, hasDynamicItems, indexOf, indexOf, insert, insertAfter, insertAfter, insertBefore, insertBefore, internalSetItems, isDirty, isEmpty, itemAdded, itemRemoved, prependToGroup, prependToGroup, remove, remove, removeAll, replaceItem, setDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IContributionManager
add, find, getItems, insertAfter, insertAfter, insertBefore, insertBefore, isDirty, isEmpty, prependToGroup, prependToGroup, remove, remove, removeAll
 
Methods inherited from interface org.eclipse.jface.action.IContributionItem
isDirty
 

Constructor Detail

SystemSubMenuManagerForTesting

public SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction)
Constructor


SystemSubMenuManagerForTesting

public SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction,
                                      String text)
Constructor


SystemSubMenuManagerForTesting

public SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction,
                                      String text,
                                      String id)
Constructor


SystemSubMenuManagerForTesting

public SystemSubMenuManagerForTesting(SystemBaseSubMenuAction parentAction,
                                      String text,
                                      String id,
                                      ImageDescriptor image)
Constructor

Method Detail

setInputs

public void setInputs(Shell shell,
                      Viewer v,
                      ISelection selection)
Override of parent so we can trace it....

Overrides:
setInputs in class SystemSubMenuManager

appendToGroup

public void appendToGroup(String groupName,
                          IAction action)
Intercept so we can cascade the selection, viewer and shell down

Specified by:
appendToGroup in interface IContributionManager
Overrides:
appendToGroup in class SystemSubMenuManager

appendToGroup

public void appendToGroup(String groupName,
                          IContributionItem item)
Intercept so we can cascade the selection, viewer and shell down

Specified by:
appendToGroup in interface IContributionManager
Overrides:
appendToGroup in class SystemSubMenuManager

add

public void add(IContributionItem item)
Intercept so we can cascade the selection, viewer and shell down

Specified by:
add in interface IContributionManager
Overrides:
add in class SystemSubMenuManager

cascadeAllInputs

protected void cascadeAllInputs()
Cascade in one shot all input state inputs to all actions

Overrides:
cascadeAllInputs in class SystemSubMenuManager

cascadeAllInputs

protected void cascadeAllInputs(ISystemAction action)
Cascade in one shot all input state inputs to one action

Overrides:
cascadeAllInputs in class SystemSubMenuManager

cascadeAllInputs

protected void cascadeAllInputs(SystemSubMenuManager submenu)
Cascade in one shot all input state inputs to one submenu

Overrides:
cascadeAllInputs in class SystemSubMenuManager

RSE
Release 1.0

Copyright (c) IBM Corporation and others 2000, 2006. All Rights Reserved.