@Deprecated public class OpenPerspectiveMenu extends PerspectiveMenu
An OpenPerspectiveMenu
is used to populate a menu with
actions that will open a new perspective. If the user selects one of
these items either a new page is added to the workbench, a new
workbench window is created with the chosen perspective or the current
perspective will be replaced with the new onw.
The visible perspectives within the menu may also be updated dynamically to reflect user preference.
The input for the page is determined by the value of pageInput
.
The input should be passed into the constructor of this class or set using
the setPageInput
method.
This class may be instantiated; it is not intended to be subclassed.
SHOW_PERSP_ID
Constructor and Description |
---|
OpenPerspectiveMenu(IMenuManager menuManager,
IWorkbenchWindow window)
Deprecated.
Constructs a new menu.
|
OpenPerspectiveMenu(IWorkbenchWindow window)
Deprecated.
Constructs a new instance of
OpenNewPageMenu . |
OpenPerspectiveMenu(IWorkbenchWindow window,
IAdaptable input)
Deprecated.
Constructs a new instance of
OpenNewPageMenu . |
Modifier and Type | Method and Description |
---|---|
protected void |
run(IPerspectiveDescriptor desc)
Deprecated.
Runs an action for a particular perspective.
|
protected void |
run(IPerspectiveDescriptor desc,
SelectionEvent event)
Deprecated.
Runs an action for a particular perspective.
|
void |
setPageInput(IAdaptable input)
Deprecated.
Sets the page input.
|
void |
setReplaceEnabled(boolean isEnabled)
Deprecated.
Set whether replace menu item is enabled within its parent menu.
|
fill, getPerspectiveItems, getShowActive, getWindow, isDirty, isDynamic, showActive
dispose, fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update, update
public OpenPerspectiveMenu(IMenuManager menuManager, IWorkbenchWindow window)
public OpenPerspectiveMenu(IWorkbenchWindow window)
OpenNewPageMenu
.
If this method is used be sure to set the page input by invoking
setPageInput
. The page input is required when the user
selects an item in the menu. At that point the menu will attempt to
open a new page with the selected perspective and page input. If there
is no page input an error dialog will be opened.
window
- the window where a new page is created if an item within
the menu is selectedpublic OpenPerspectiveMenu(IWorkbenchWindow window, IAdaptable input)
OpenNewPageMenu
.window
- the window where a new page is created if an item within
the menu is selectedinput
- the page inputprotected void run(IPerspectiveDescriptor desc)
run
in class PerspectiveMenu
desc
- the selected perspectiveprotected void run(IPerspectiveDescriptor desc, SelectionEvent event)
run
in class PerspectiveMenu
desc
- the selected perspectiveevent
- the event sent along with the selection callbackpublic void setPageInput(IAdaptable input)
input
- the page inputpublic void setReplaceEnabled(boolean isEnabled)
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.