Remote Systems
v6.4.1

com.ibm.etools.systems.core.ui.actions
Class SystemSubMenuManager

java.lang.Object
  extended byMenuManager
      extended bycom.ibm.etools.systems.core.ui.actions.SystemSubMenuManager
Direct Known Subclasses:
SystemSubMenuManagerForTesting

public class SystemSubMenuManager
extends MenuManager

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

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

See Also:
Serialized Form

Field Summary
static String copyright
           
protected  boolean deferPopulation
           
protected  ImageDescriptor image
           
protected  String label
           
protected  SystemBaseSubMenuAction parentCascadingAction
           
protected  ISelection selection
           
protected  Shell shell
           
protected  String toolTipText
           
protected  boolean traceSelections
           
protected  String traceTarget
           
protected  Viewer viewer
           
 
Constructor Summary
SystemSubMenuManager(SystemBaseSubMenuAction parentAction)
          Constructor for SystemSubMenuManager
SystemSubMenuManager(SystemBaseSubMenuAction parentAction, String text)
          Constructor for SystemSubMenuManager
SystemSubMenuManager(SystemBaseSubMenuAction parentAction, String text, String id)
          Constructor for SystemSubMenuManager
SystemSubMenuManager(SystemBaseSubMenuAction parentAction, String text, String id, ImageDescriptor image)
          Constructor for SystemSubMenuManager
 
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
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
 String getLabel()
          Return the label for this submenu
 SystemBaseSubMenuAction getParentCascadingAction()
          Return the parent cascading menu action that created this.
 IStructuredSelection getSelection()
          Get the Selection
 Shell getShell()
          Get the Shell that hosts this action.
 String getToolTipText()
          Get the tooltip text when this is used for in a cascading menu
 Viewer getViewer()
          Get the Viewer that called this action.
protected  void issueTraceMessage(String msg)
          Issue trace message
 void setInputs(Shell shell, Viewer v, ISelection selection)
          An optimization for performance reasons that allows all inputs to be set in one call.
 void setSelection(ISelection selection)
          This is called by the framework to set the selection input, just prior to showing the popup menu.
 void setShell(Shell shell)
          Sets the parent shell for this action.
 void setToolTipText(String tip)
          Set the tooltip text when this is used for in a cascading menu.
 void setTracing(boolean tracing)
          Turn on tracing for selections, shell and viewer to watch as it is set
 void setTracing(boolean tracing, String tracingClassTarget)
          Turn on tracing for selections, shell and viewer to watch as it is set, scoped to a particular class name (will use indexOf('xxx') to match).
 void setTracing(String tracingClassTarget)
          Turn on tracing for selections, shell and viewer to watch as it is set, scoped to a particular class name (will use indexOf('xxx') to match).
 void setViewer(Viewer v)
          Set the Viewer that called this action.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values

toolTipText

protected String toolTipText

image

protected ImageDescriptor image

shell

protected Shell shell

viewer

protected Viewer viewer

deferPopulation

protected boolean deferPopulation

traceSelections

protected boolean traceSelections

traceTarget

protected String traceTarget

selection

protected ISelection selection

label

protected String label

parentCascadingAction

protected SystemBaseSubMenuAction parentCascadingAction
Constructor Detail

SystemSubMenuManager

public SystemSubMenuManager(SystemBaseSubMenuAction parentAction)
Constructor for SystemSubMenuManager


SystemSubMenuManager

public SystemSubMenuManager(SystemBaseSubMenuAction parentAction,
                            String text)
Constructor for SystemSubMenuManager


SystemSubMenuManager

public SystemSubMenuManager(SystemBaseSubMenuAction parentAction,
                            String text,
                            String id)
Constructor for SystemSubMenuManager


SystemSubMenuManager

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

Method Detail

getParentCascadingAction

public SystemBaseSubMenuAction getParentCascadingAction()
Return the parent cascading menu action that created this.


setToolTipText

public void setToolTipText(String tip)
Set the tooltip text when this is used for in a cascading menu.

See Also:
SystemBaseSubMenuAction

getToolTipText

public String getToolTipText()
Get the tooltip text when this is used for in a cascading menu


getLabel

public String getLabel()
Return the label for this submenu


setInputs

public void setInputs(Shell shell,
                      Viewer v,
                      ISelection selection)
An optimization for performance reasons that allows all inputs to be set in one call. This is called by SystemView's fillContextMenu method.


setShell

public void setShell(Shell shell)
Sets the parent shell for this action. Usually context dependent. We cascade this down to all of the actions added to this submenu.


setSelection

public void setSelection(ISelection selection)
This is called by the framework to set the selection input, just prior to showing the popup menu. We cascade this down to all of the actions added to this submenu.


setViewer

public void setViewer(Viewer v)
Set the Viewer that called this action. It is good practice for viewers to call this so actions can directly access them if needed.


getViewer

public Viewer getViewer()
Get the Viewer that called this action. Not guaranteed to be set, depends if that viewer called setViewer or not. SystemView does.


getShell

public Shell getShell()
Get the Shell that hosts this action. Not guaranteed to be set,


getSelection

public IStructuredSelection getSelection()
Get the Selection


appendToGroup

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


add

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


cascadeAllInputs

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


cascadeAllInputs

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


cascadeAllInputs

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


setTracing

public void setTracing(boolean tracing)
Turn on tracing for selections, shell and viewer to watch as it is set


setTracing

public void setTracing(String tracingClassTarget)
Turn on tracing for selections, shell and viewer to watch as it is set, scoped to a particular class name (will use indexOf('xxx') to match).


setTracing

public void setTracing(boolean tracing,
                       String tracingClassTarget)
Turn on tracing for selections, shell and viewer to watch as it is set, scoped to a particular class name (will use indexOf('xxx') to match).


issueTraceMessage

protected void issueTraceMessage(String msg)
Issue trace message


Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.