| org.eclipse.ui.actions.PerspectiveMenu
All known Subclasses: org.eclipse.ui.actions.OpenPerspectiveMenu, org.eclipse.ui.actions.OpenNewPageMenu, org.eclipse.ui.actions.OpenNewWindowMenu, org.eclipse.ui.internal.ChangeToPerspectiveMenu,
PerspectiveMenu | abstract public class PerspectiveMenu extends ContributionItem (Code) | | A menu for perspective selection.
A PerspectiveMenu is used to populate a menu with
perspective shortcut items. If the user selects one of these items
an action is performed for the selected perspective.
The visible perspective items within the menu are dynamic and reflect the
available set generated by each subclass. The default available set consists
of the perspective shortcut list of the current perspective.
This class is abstract. Subclasses must implement the run method,
which performs a specialized action for the selected perspective.
|
PerspectiveMenu | public PerspectiveMenu(IWorkbenchWindow window, String id)(Code) | | Constructs a new instance of PerspectiveMenu .
Parameters: window - the window containing this menu Parameters: id - the menu id |
fill | public void fill(Menu menu, int index)(Code) | | |
getPerspectiveItems | protected ArrayList getPerspectiveItems()(Code) | | Returns the available list of perspectives to display in the menu.
By default, the list contains the perspective shortcuts
for the current perspective.
Subclasses can override this method to return a different list.
an ArrayList of perspective items IPerspectiveDescriptor |
getShowActive | protected boolean getShowActive()(Code) | | Returns whether the menu item representing the active perspective
will have a check mark.
true if a check mark is shown, false otherwise |
isDirty | public boolean isDirty()(Code) | | |
isDynamic | public boolean isDynamic()(Code) | | |
run | abstract protected void run(IPerspectiveDescriptor desc)(Code) | | Runs an action for a particular perspective. The behavior of the
action is defined by the subclass.
Parameters: desc - the selected perspective |
run | protected void run(IPerspectiveDescriptor desc, SelectionEvent event)(Code) | | Runs an action for a particular perspective. The behavior of the action
is defined by the subclass. By default, this just calls
run(IPerspectiveDescriptor) .
Parameters: desc - the selected perspective Parameters: event - SelectionEvent - the event send along with the selectioncallback |
runOther | void runOther(SelectionEvent event)(Code) | | |
showActive | protected void showActive(boolean b)(Code) | | Sets the showActive flag. If showActive == true then the
active perspective is hilighted with a check mark.
Parameters: b - the new showActive flag |
|
|