|
|||||||||
| Home >> All >> org >> eclipse >> ui >> [ internal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.eclipse.ui.internal
Class WorkbenchWindow

java.lang.Objectorg.eclipse.jface.window.Window
org.eclipse.jface.window.ApplicationWindow
org.eclipse.ui.internal.WorkbenchWindow
- All Implemented Interfaces:
- org.eclipse.ui.IPageService, org.eclipse.jface.operation.IRunnableContext, org.eclipse.ui.IWorkbenchWindow
- public class WorkbenchWindow
- extends org.eclipse.jface.window.ApplicationWindow
- implements org.eclipse.ui.IWorkbenchWindow
- extends org.eclipse.jface.window.ApplicationWindow
A window within the workbench.
| Nested Class Summary | |
(package private) class |
WorkbenchWindow.PageList
|
| Nested classes inherited from class org.eclipse.jface.window.ApplicationWindow |
|
| Nested classes inherited from class org.eclipse.jface.window.Window |
org.eclipse.jface.window.Window.IExceptionHandler |
| Field Summary | |
private WWinActionBars |
actionBars
|
private ActionPresentation |
actionPresentation
|
private java.util.Map |
actionSetHandlersByCommandId
The handlers for action set actions that were last submitted to the workbench command support. |
private boolean |
asMaximizedState
|
(package private) static int |
BAR_SIZE
|
(package private) static int |
CLIENT_INSET
|
private boolean |
closing
|
private boolean |
coolBarVisible
|
private org.eclipse.ui.internal.layout.TrimLayout |
defaultLayout
|
private FastViewBar |
fastViewBar
|
private static int |
FILL_ALL_ACTION_BARS
Constant indicating that all the actions bars should be filled. |
private java.util.Map |
globalActionHandlersByCommandId
The handlers for global actions that were last submitted to the workbench command support. |
(package private) static java.lang.String |
GRP_FAST_VIEWS
|
(package private) static java.lang.String |
GRP_PAGES
|
(package private) static java.lang.String |
GRP_PERSPECTIVES
|
private java.util.List |
handlerSubmissions
The list of handler submissions submitted to the workbench command support. |
private org.eclipse.swt.graphics.Point |
lastShellSize
|
static int |
NEW_WIZARD_SUBMENU
Constant (bit mask) indicating which the New Wizard submenu is probably present somewhere in this window. |
private org.eclipse.swt.widgets.Label |
noOpenPerspective
|
private org.eclipse.swt.graphics.Rectangle |
normalBounds
|
private int |
number
|
static int |
OPEN_PERSPECTIVE_SUBMENU
Constant (bit mask) indicating which the Open Perspective submenu is probably present somewhere in this window. |
private org.eclipse.swt.widgets.Composite |
pageComposite
The composite under which workbench pages create their controls. |
private WorkbenchWindow.PageList |
pageList
|
private PageListenerList |
pageListeners
|
private WWinPartService |
partService
|
private boolean |
perspectiveBarVisible
|
private PerspectiveListenerListOld |
perspectiveListeners
|
private WWinPerspectiveService |
perspectiveService
|
private PerspectiveSwitcher |
perspectiveSwitcher
|
(package private) org.eclipse.ui.internal.progress.ProgressRegion |
progressRegion
|
private boolean |
shellActivated
|
static int |
SHOW_VIEW_SUBMENU
Constant (bit mask) indicating which the Show View submenu is probably present somewhere in this window. |
private boolean |
statusLineVisible
|
private int |
submenus
Bit flags indication which submenus (New, Show Views, ...) this window contains. |
private org.eclipse.swt.custom.CBanner |
topBar
|
private TrimDropTarget |
trimDropTarget
|
private boolean |
updateDisabled
|
(package private) static int |
VGAP
|
private WorkbenchWindowConfigurer |
windowConfigurer
Object for configuring this workbench window. |
| Fields inherited from class org.eclipse.jface.window.ApplicationWindow |
seperator1 |
| Fields inherited from class org.eclipse.jface.window.Window |
CANCEL, OK |
| Constructor Summary | |
WorkbenchWindow(int number)
Creates and initializes a new workbench window. |
|
| Method Summary | |
void |
addPageListener(org.eclipse.ui.IPageListener l)
Adds the given listener for page lifecycle events. |
protected void |
addPerspectiveBar(int style)
Configures this window to have a perspecive bar. |
void |
addPerspectiveBarToTrim(org.eclipse.swt.widgets.Control control,
int side)
Add the argument perspective bar control to the argument side of this window's trim. |
void |
addPerspectiveListener(org.eclipse.ui.IPerspectiveListener l)
Adds the given listener for a page's perspective lifecycle events. |
(package private) void |
addPerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor perspective,
WorkbenchPage workbenchPage)
add a shortcut for the page. |
void |
addSubmenu(int type)
Remembers that this window contains the given submenu. |
private boolean |
busyClose()
Close the window. |
protected org.eclipse.ui.IWorkbenchPage |
busyOpenPage(java.lang.String perspID,
org.eclipse.core.runtime.IAdaptable input)
Opens a new page. |
protected boolean |
canHandleShellCloseEvent()
Determines if the window should handle the close event or do nothing. |
boolean |
close()
Closes this workbench window. |
private void |
closeAllPages()
Close all of the pages. |
void |
closeAllPages(boolean save)
Save and close all of the pages. |
protected boolean |
closePage(org.eclipse.ui.IWorkbenchPage in,
boolean save)
closePerspective method comment. |
protected void |
configureShell(org.eclipse.swt.widgets.Shell shell)
Extends the super implementation by creating the trim widgets using createTrimWidgets. |
boolean |
containsSubmenu(int type)
Checks to see if this window contains the given type of submenu. |
protected org.eclipse.swt.widgets.Control |
createContents(org.eclipse.swt.widgets.Composite parent)
Creates the contents of the workbench window, including trim controls and the client composite. |
protected void |
createDefaultContents(org.eclipse.swt.widgets.Shell shell)
Creates the default contents and layout of the shell. |
protected org.eclipse.swt.widgets.Composite |
createPageComposite(org.eclipse.swt.widgets.Composite parent)
Creates and remembers the client composite, under which workbench pages create their controls. |
private void |
createProgressIndicator(org.eclipse.swt.widgets.Shell shell)
Create the progress indicator for the receiver. |
protected void |
createStatusLine(org.eclipse.swt.widgets.Shell shell)
Delegate to the presentation factory. |
protected org.eclipse.jface.action.StatusLineManager |
createStatusLineManager()
Delegate to the presentation factory. |
protected void |
createTrimWidgets(org.eclipse.swt.widgets.Shell shell)
Creates the trim widgets around the content area. |
void |
fillActionBars(org.eclipse.ui.application.IActionBarConfigurer configurer,
int flags)
Creates a clone copy of the current action bars |
private org.eclipse.jface.action.IContributionItem |
findAlphabeticalOrder(java.lang.String startId,
java.lang.String itemId,
org.eclipse.jface.action.IContributionManager mgr)
Returns the contribution item that the given contribution item should be inserted after. |
(package private) org.eclipse.jface.action.IContributionItem |
findPerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor perspective,
WorkbenchPage page)
Returns the shortcut for a page. |
private void |
firePageActivated(org.eclipse.ui.IWorkbenchPage page)
Fires page activated |
private void |
firePageClosed(org.eclipse.ui.IWorkbenchPage page)
Fires page closed |
private void |
firePageOpened(org.eclipse.ui.IWorkbenchPage page)
Fires page opened |
(package private) void |
firePerspectiveActivated(org.eclipse.ui.IWorkbenchPage page,
org.eclipse.ui.IPerspectiveDescriptor perspective)
Fires perspective activated |
(package private) void |
firePerspectiveChanged(org.eclipse.ui.IWorkbenchPage page,
org.eclipse.ui.IPerspectiveDescriptor perspective,
org.eclipse.ui.IWorkbenchPartReference partRef,
java.lang.String changeId)
Fires perspective changed for an affected part |
(package private) void |
firePerspectiveChanged(org.eclipse.ui.IWorkbenchPage page,
org.eclipse.ui.IPerspectiveDescriptor perspective,
java.lang.String changeId)
Fires perspective changed |
(package private) void |
firePerspectiveClosed(org.eclipse.ui.IWorkbenchPage page,
org.eclipse.ui.IPerspectiveDescriptor perspective)
Fires perspective closed |
(package private) void |
firePerspectiveOpened(org.eclipse.ui.IWorkbenchPage page,
org.eclipse.ui.IPerspectiveDescriptor perspective)
Fires perspective opened |
WWinActionBars |
getActionBars()
Returns the action bars for this window. |
protected ActionPresentation |
getActionPresentation()
|
org.eclipse.ui.IWorkbenchPage |
getActivePage()
Returns the active page. |
(package private) WorkbenchPage |
getActiveWorkbenchPage()
Returns the active workbench page. |
private org.eclipse.ui.application.WorkbenchAdvisor |
getAdvisor()
Returns the workbench advisor. |
boolean |
getCoolBarVisible()
|
FastViewBar |
getFastViewBar()
Returns the fast view bar. |
protected org.eclipse.swt.graphics.Point |
getInitialSize()
The WorkbenchWindow implementation of this method
delegates to the window configurer. |
protected org.eclipse.swt.widgets.Layout |
getLayout()
Returns the layout for the shell. |
org.eclipse.jface.action.MenuManager |
getMenuManager()
Answer the menu manager for this window. |
int |
getNumber()
Returns the number. |
protected org.eclipse.swt.widgets.Composite |
getPageComposite()
Returns the page composite, under which the window's pages create their controls. |
org.eclipse.ui.IWorkbenchPage[] |
getPages()
Returns an array of the pages in the workbench window. |
org.eclipse.ui.IPartService |
getPartService()
Returns the part service which tracks part activation within this workbench window. |
PerspectiveBarManager |
getPerspectiveBar()
Returns the perspective bar. |
boolean |
getPerspectiveBarVisible()
|
IPerspectiveService |
getPerspectiveService()
|
org.eclipse.ui.internal.progress.ProgressRegion |
getProgressRegion()
|
org.eclipse.ui.ISelectionService |
getSelectionService()
Returns the selection service which tracks selection within this workbench window. |
boolean |
getShellActivated()
Returns true when the window's shell
is activated, false when it's shell is
deactivated |
boolean |
getShowFastViewBars()
|
org.eclipse.jface.action.StatusLineManager |
getStatusLineManager()
Returns the status line manager for this window (if it has one). |
boolean |
getStatusLineVisible()
|
java.lang.String |
getToolbarLabel(java.lang.String actionSetId)
|
(package private) WorkbenchWindowConfigurer |
getWindowConfigurer()
Returns the unique object that applications use to configure this window. |
org.eclipse.ui.IWorkbench |
getWorkbench()
Returns the workbench for this window. |
private Workbench |
getWorkbenchImpl()
|
private boolean |
hardClose()
Unconditionally close this window. |
protected void |
initializeBounds()
The WorkbenchWindow implementation of this method has the same
logic as Window's implementation, but without the resize check. |
boolean |
isApplicationMenu(java.lang.String menuID)
Returns whether the specified menu is an application menu as opposed to a part menu. |
protected boolean |
isClosing()
|
protected boolean |
isCoolBarLocked()
Return whether or not the coolbar layout is locked. |
(package private) boolean |
isWorkbenchCoolItemId(java.lang.String id)
Return whether or not the given id matches the id of the coolitems that the application creates. |
(package private) void |
lockCoolBar(boolean lock)
Locks/unlocks the CoolBar for the workbench. |
boolean |
okToClose()
Called when this window is about to be closed. |
int |
open()
Opens this window, creating it first if it has not yet been created. |
org.eclipse.ui.IWorkbenchPage |
openPage(org.eclipse.core.runtime.IAdaptable input)
Opens a new page. |
org.eclipse.ui.IWorkbenchPage |
openPage(java.lang.String perspId,
org.eclipse.core.runtime.IAdaptable input)
Opens a new page. |
protected int |
perspectiveBarStyle()
Return the style bits for the shortcut bar. |
private boolean |
readLayout(org.eclipse.ui.IMemento memento,
java.util.ArrayList itemIds,
java.util.ArrayList wrapIndicies)
Helper method used for restoring an old cool bar layout. |
(package private) void |
registerActionSets(org.eclipse.ui.internal.registry.IActionSet[] actionSets)
|
(package private) void |
registerGlobalAction(org.eclipse.jface.action.IAction globalAction)
|
void |
removePageListener(org.eclipse.ui.IPageListener l)
Removes the given page listener. |
void |
removePerspectiveListener(org.eclipse.ui.IPerspectiveListener l)
Removes the given page's perspective listener. |
(package private) void |
removePerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor perspective,
WorkbenchPage page)
Remove the shortcut for a page. |
private boolean |
restoreOldCoolBar(org.eclipse.ui.IMemento coolbarMem)
Restores cool item order from an old workbench. |
org.eclipse.core.runtime.IStatus |
restoreState(org.eclipse.ui.IMemento memento,
org.eclipse.ui.IPerspectiveDescriptor activeDescriptor)
|
void |
run(boolean fork,
boolean cancelable,
org.eclipse.jface.operation.IRunnableWithProgress runnable)
Runs the given IRunnableWithProgress in this context. |
private boolean |
saveAllPages(boolean bConfirm)
Save all of the pages. |
org.eclipse.core.runtime.IStatus |
saveState(org.eclipse.ui.IMemento memento)
|
(package private) void |
selectPerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor perspective,
WorkbenchPage page,
boolean selected)
Select the shortcut for a perspective. |
void |
setActivePage(org.eclipse.ui.IWorkbenchPage in)
Sets the active page within the window. |
void |
setBannerCurve(boolean square)
If the perspective bar is drawn on the top right corner of the window, then this method changes its appearance from curved to square. |
void |
setCoolBarVisible(boolean visible)
|
private void |
setLayoutDataForContents()
Set the layout data for the contents of the window. |
void |
setPerspectiveBarLocation(java.lang.String location)
|
void |
setPerspectiveBarVisible(boolean visible)
|
void |
setStatusLineVisible(boolean visible)
|
private void |
showEmptyWindowMessage()
|
protected boolean |
showTopSeperator()
Returns whether to show a top separator line between the menu bar and the rest of the window contents. |
(package private) void |
submitActionSetAndGlobalHandlers()
Submits the action handlers for action set actions and global actions. |
protected boolean |
toolBarChildrenExist()
Returns whether or not children exist for the Window's toolbar control. |
private void |
trackShellActivation(org.eclipse.swt.widgets.Shell shell)
Hooks a listener to track the activation and deactivation of the window's shell. |
private void |
trackShellResize(org.eclipse.swt.widgets.Shell newShell)
Hooks a listener to track the resize of the window's shell. |
private org.eclipse.core.runtime.IStatus |
unableToRestorePage(org.eclipse.ui.IMemento pageMem)
|
void |
updateActionBars()
update the action bars. |
void |
updateActionSets()
Update the visible action sets. |
void |
updateFastViewBar()
Updates the fast view bar, if present. |
private void |
updateLayoutDataForContents()
Note that this will only have an effect if the default implementation of WorkbenchAdvisor.createWindowContents() has been invoked. |
(package private) void |
updatePerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor oldDesc,
org.eclipse.ui.IPerspectiveDescriptor newDesc,
WorkbenchPage page)
Updates the shorcut item |
| Methods inherited from class org.eclipse.jface.window.ApplicationWindow |
addCoolBar, addMenuBar, addStatusLine, addToolBar, coolBarChildrenExist, createCoolBarControl, createCoolBarManager, createMenuManager, createToolBarControl, createToolBarManager, getCoolBarControl, getCoolBarManager, getFont, getMenuBarManager, getSeperator1, getSymbolicFontName, getToolBarControl, getToolBarManager, setStatus |
| Methods inherited from class org.eclipse.jface.window.Window |
constrainShellSize, create, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getInitialLocation, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, setBlockOnOpen, setDefaultImage, setDefaultImages, setExceptionHandler, setReturnCode, setShellStyle, setWindowManager |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.ui.IWorkbenchWindow |
getShell |
| Field Detail |
number
private int number
pageList
private WorkbenchWindow.PageList pageList
pageListeners
private PageListenerList pageListeners
perspectiveListeners
private PerspectiveListenerListOld perspectiveListeners
perspectiveService
private WWinPerspectiveService perspectiveService
partService
private WWinPartService partService
actionPresentation
private ActionPresentation actionPresentation
actionBars
private WWinActionBars actionBars
updateDisabled
private boolean updateDisabled
closing
private boolean closing
shellActivated
private boolean shellActivated
fastViewBar
private FastViewBar fastViewBar
perspectiveSwitcher
private PerspectiveSwitcher perspectiveSwitcher
defaultLayout
private org.eclipse.ui.internal.layout.TrimLayout defaultLayout
progressRegion
org.eclipse.ui.internal.progress.ProgressRegion progressRegion
noOpenPerspective
private org.eclipse.swt.widgets.Label noOpenPerspective
normalBounds
private org.eclipse.swt.graphics.Rectangle normalBounds
asMaximizedState
private boolean asMaximizedState
topBar
private org.eclipse.swt.custom.CBanner topBar
lastShellSize
private org.eclipse.swt.graphics.Point lastShellSize
pageComposite
private org.eclipse.swt.widgets.Composite pageComposite
- The composite under which workbench pages create their controls.
- Since:
- 3.0
submenus
private int submenus
- Bit flags indication which submenus (New, Show Views, ...) this
window contains. Initially none.
- Since:
- 3.0
windowConfigurer
private WorkbenchWindowConfigurer windowConfigurer
- Object for configuring this workbench window. Lazily initialized to
an instance unique to this window.
- Since:
- 3.0
GRP_PAGES
static final java.lang.String GRP_PAGES
- See Also:
- Constant Field Values
GRP_PERSPECTIVES
static final java.lang.String GRP_PERSPECTIVES
- See Also:
- Constant Field Values
GRP_FAST_VIEWS
static final java.lang.String GRP_FAST_VIEWS
- See Also:
- Constant Field Values
VGAP
static final int VGAP
- See Also:
- Constant Field Values
CLIENT_INSET
static final int CLIENT_INSET
- See Also:
- Constant Field Values
BAR_SIZE
static final int BAR_SIZE
- See Also:
- Constant Field Values
SHOW_VIEW_SUBMENU
public static final int SHOW_VIEW_SUBMENU
- Constant (bit mask) indicating which the Show View submenu is
probably present somewhere in this window.
- Since:
- 3.0
- See Also:
addSubmenu(int)55 , Constant Field Values
OPEN_PERSPECTIVE_SUBMENU
public static final int OPEN_PERSPECTIVE_SUBMENU
- Constant (bit mask) indicating which the Open Perspective submenu is
probably present somewhere in this window.
- Since:
- 3.0
- See Also:
addSubmenu(int)55 , Constant Field Values
NEW_WIZARD_SUBMENU
public static final int NEW_WIZARD_SUBMENU
- Constant (bit mask) indicating which the New Wizard submenu is
probably present somewhere in this window.
- Since:
- 3.0
- See Also:
addSubmenu(int)55 , Constant Field Values
FILL_ALL_ACTION_BARS
private static final int FILL_ALL_ACTION_BARS
- Constant indicating that all the actions bars should be
filled.
- Since:
- 3.0
- See Also:
- Constant Field Values
trimDropTarget
private TrimDropTarget trimDropTarget
coolBarVisible
private boolean coolBarVisible
perspectiveBarVisible
private boolean perspectiveBarVisible
statusLineVisible
private boolean statusLineVisible
actionSetHandlersByCommandId
private java.util.Map actionSetHandlersByCommandId
- The handlers for action set actions that were last submitted to the
workbench command support. This is a map of command identifiers to
ActionHandler. This map is nevernull, and is never empty as long as at least one action set has been registered. The items in this map may not all be submitted, as global actions take priority.
globalActionHandlersByCommandId
private java.util.Map globalActionHandlersByCommandId
- The handlers for global actions that were last submitted to the workbench
command support. This is a map of command identifiers to
ActionHandler. This map is nevernull, and is never empty as long as at least one global action has been registered.
handlerSubmissions
private java.util.List handlerSubmissions
- The list of handler submissions submitted to the workbench command
support. This list may be empty, but it is never
null.
| Constructor Detail |
WorkbenchWindow
public WorkbenchWindow(int number)
- Creates and initializes a new workbench window.
| Method Detail |
addSubmenu
public void addSubmenu(int type)
- Remembers that this window contains the given submenu.
- Since:
- 3.0
containsSubmenu
public boolean containsSubmenu(int type)
- Checks to see if this window contains the given type of submenu.
- Since:
- 3.0
perspectiveBarStyle
protected int perspectiveBarStyle()
- Return the style bits for the shortcut bar.
registerActionSets
void registerActionSets(org.eclipse.ui.internal.registry.IActionSet[] actionSets)
registerGlobalAction
void registerGlobalAction(org.eclipse.jface.action.IAction globalAction)
submitActionSetAndGlobalHandlers
void submitActionSetAndGlobalHandlers()
Submits the action handlers for action set actions and global actions. Global actions are given priority, so that if a global action and an action set action both handle the same command, the global action is given priority.
These submissions are submitted as
Priority.LEGACY, which means that they are the lowest priority. This means that if a higher priority submission handles the same command under the same conditions, that that submission will become the handler.
addPageListener
public void addPageListener(org.eclipse.ui.IPageListener l)
- Description copied from interface:
org.eclipse.ui.IPageService - Adds the given listener for page lifecycle events.
Has no effect if an identical listener is already registered.
- Specified by:
addPageListenerin interfaceorg.eclipse.ui.IPageService
addPerspectiveListener
public void addPerspectiveListener(org.eclipse.ui.IPerspectiveListener l)
- Description copied from interface:
org.eclipse.ui.IPageService - Adds the given listener for a page's perspective lifecycle events.
Has no effect if an identical listener is already registered.
- Specified by:
addPerspectiveListenerin interfaceorg.eclipse.ui.IPageService
addPerspectiveShortcut
void addPerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor perspective, WorkbenchPage workbenchPage)
- add a shortcut for the page.
addPerspectiveBar
protected void addPerspectiveBar(int style)
- Configures this window to have a perspecive bar.
Does nothing if it already has one.
busyClose
private boolean busyClose()
- Close the window.
Assumes that busy cursor is active.
busyOpenPage
protected org.eclipse.ui.IWorkbenchPage busyOpenPage(java.lang.String perspID, org.eclipse.core.runtime.IAdaptable input) throws org.eclipse.ui.WorkbenchException
- Opens a new page. Assumes that busy cursor is active.
Note: Since release 2.0, a window is limited to contain at most one page. If a page exist in the window when this method is used, then another window is created for the new page. Callers are strongly recommended to use the
IWorkbench.openPerspectiveAPIs to programmatically show a perspective.
open
public int open()
- Description copied from class:
org.eclipse.jface.window.Window - Opens this window, creating it first if it has not yet been created.
If this window has been configured to block on open (
setBlockOnOpen), this method waits until the window is closed by the end user, and then it returns the window's return code; otherwise, this method returns immediately. A window's return codes are window-specific, although two standard return codes are predefined:OKandCANCEL.
canHandleShellCloseEvent
protected boolean canHandleShellCloseEvent()
- Description copied from class:
org.eclipse.jface.window.Window - Determines if the window should handle the close event
or do nothing.
The default implementation of this framework method returns
true, which will allow thehandleShellCloseEventmethod to be called. Subclasses may extend or reimplement.
close
public boolean close()
- Description copied from interface:
org.eclipse.ui.IWorkbenchWindow - Closes this workbench window.
If the window has an open editor with unsaved content, the user will be given the opportunity to save it.
- Specified by:
closein interfaceorg.eclipse.ui.IWorkbenchWindow
isClosing
protected boolean isClosing()
isCoolBarLocked
protected boolean isCoolBarLocked()
- Return whether or not the coolbar layout is locked.
closeAllPages
private void closeAllPages()
- Close all of the pages.
closeAllPages
public void closeAllPages(boolean save)
- Save and close all of the pages.
closePage
protected boolean closePage(org.eclipse.ui.IWorkbenchPage in, boolean save)
- closePerspective method comment.
showEmptyWindowMessage
private void showEmptyWindowMessage()
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell shell)
- Description copied from class:
org.eclipse.jface.window.ApplicationWindow - Extends the super implementation by creating the trim widgets using
createTrimWidgets.
createTrimWidgets
protected void createTrimWidgets(org.eclipse.swt.widgets.Shell shell)
- Description copied from class:
org.eclipse.jface.window.ApplicationWindow - Creates the trim widgets around the content area.
createPageComposite
protected org.eclipse.swt.widgets.Composite createPageComposite(org.eclipse.swt.widgets.Composite parent)
- Creates and remembers the client composite, under which workbench
pages create their controls.
- Since:
- 3.0
createContents
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
- Creates the contents of the workbench window, including
trim controls and the client composite.
This MUST create the client composite via a call to
createClientComposite.- Since:
- 3.0
setBannerCurve
public void setBannerCurve(boolean square)
- If the perspective bar is drawn on the top right corner of the window,
then this method changes its appearance from curved to square. This
should have its own preference, but for now it piggy-backs on the
SHOW_TRADITIONAL_STYLE_TABS preference.
createDefaultContents
protected void createDefaultContents(org.eclipse.swt.widgets.Shell shell)
- Creates the default contents and layout of the shell.
setPerspectiveBarLocation
public void setPerspectiveBarLocation(java.lang.String location)
findPerspectiveShortcut
org.eclipse.jface.action.IContributionItem findPerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor perspective, WorkbenchPage page)
- Returns the shortcut for a page.
firePageActivated
private void firePageActivated(org.eclipse.ui.IWorkbenchPage page)
- Fires page activated
firePageClosed
private void firePageClosed(org.eclipse.ui.IWorkbenchPage page)
- Fires page closed
firePageOpened
private void firePageOpened(org.eclipse.ui.IWorkbenchPage page)
- Fires page opened
firePerspectiveActivated
void firePerspectiveActivated(org.eclipse.ui.IWorkbenchPage page, org.eclipse.ui.IPerspectiveDescriptor perspective)
- Fires perspective activated
firePerspectiveChanged
void firePerspectiveChanged(org.eclipse.ui.IWorkbenchPage page, org.eclipse.ui.IPerspectiveDescriptor perspective, java.lang.String changeId)
- Fires perspective changed
firePerspectiveChanged
void firePerspectiveChanged(org.eclipse.ui.IWorkbenchPage page, org.eclipse.ui.IPerspectiveDescriptor perspective, org.eclipse.ui.IWorkbenchPartReference partRef, java.lang.String changeId)
- Fires perspective changed for an affected part
firePerspectiveClosed
void firePerspectiveClosed(org.eclipse.ui.IWorkbenchPage page, org.eclipse.ui.IPerspectiveDescriptor perspective)
- Fires perspective closed
firePerspectiveOpened
void firePerspectiveOpened(org.eclipse.ui.IWorkbenchPage page, org.eclipse.ui.IPerspectiveDescriptor perspective)
- Fires perspective opened
getActionBars
public WWinActionBars getActionBars()
- Returns the action bars for this window.
getActivePage
public org.eclipse.ui.IWorkbenchPage getActivePage()
- Returns the active page.
- Specified by:
getActivePagein interfaceorg.eclipse.ui.IWorkbenchWindow
getActiveWorkbenchPage
WorkbenchPage getActiveWorkbenchPage()
- Returns the active workbench page.
getPageComposite
protected org.eclipse.swt.widgets.Composite getPageComposite()
- Returns the page composite, under which the window's pages create
their controls.
getMenuManager
public org.eclipse.jface.action.MenuManager getMenuManager()
- Answer the menu manager for this window.
getNumber
public int getNumber()
- Returns the number. This corresponds to a page number in a window or a
window number in the workbench.
getPages
public org.eclipse.ui.IWorkbenchPage[] getPages()
- Returns an array of the pages in the workbench window.
- Specified by:
getPagesin interfaceorg.eclipse.ui.IWorkbenchWindow
getPartService
public org.eclipse.ui.IPartService getPartService()
- Description copied from interface:
org.eclipse.ui.IWorkbenchWindow - Returns the part service which tracks part activation within this
workbench window.
- Specified by:
getPartServicein interfaceorg.eclipse.ui.IWorkbenchWindow
getLayout
protected org.eclipse.swt.widgets.Layout getLayout()
- Returns the layout for the shell.
getPerspectiveService
public IPerspectiveService getPerspectiveService()
getSelectionService
public org.eclipse.ui.ISelectionService getSelectionService()
- Description copied from interface:
org.eclipse.ui.IWorkbenchWindow - Returns the selection service which tracks selection within this
workbench window.
- Specified by:
getSelectionServicein interfaceorg.eclipse.ui.IWorkbenchWindow
getShellActivated
public boolean getShellActivated()
- Returns
truewhen the window's shell is activated,falsewhen it's shell is deactivated
getStatusLineManager
public org.eclipse.jface.action.StatusLineManager getStatusLineManager()
- Returns the status line manager for this window (if it has one).
getWorkbench
public org.eclipse.ui.IWorkbench getWorkbench()
- Description copied from interface:
org.eclipse.ui.IWorkbenchWindow - Returns the workbench for this window.
- Specified by:
getWorkbenchin interfaceorg.eclipse.ui.IWorkbenchWindow
getToolbarLabel
public java.lang.String getToolbarLabel(java.lang.String actionSetId)
hardClose
private boolean hardClose()
- Unconditionally close this window. Assumes the proper
flags have been set correctly (e.i. closing and updateDisabled)
isApplicationMenu
public boolean isApplicationMenu(java.lang.String menuID)
- Description copied from interface:
org.eclipse.ui.IWorkbenchWindow - Returns whether the specified menu is an application menu as opposed to
a part menu. Application menus contain items which affect the workbench
or window. Part menus contain items which affect the active part (view
or editor).
This is typically used during "in place" editing. Application menus should be preserved during menu merging. All other menus may be removed from the window.
- Specified by:
isApplicationMenuin interfaceorg.eclipse.ui.IWorkbenchWindow
isWorkbenchCoolItemId
boolean isWorkbenchCoolItemId(java.lang.String id)
- Return whether or not the given id matches the id of the coolitems that
the application creates.
lockCoolBar
void lockCoolBar(boolean lock)
- Locks/unlocks the CoolBar for the workbench.
okToClose
public boolean okToClose()
- Called when this window is about to be closed.
Subclasses may overide to add code that returns
falseto prevent closing under certain conditions.
openPage
public org.eclipse.ui.IWorkbenchPage openPage(java.lang.String perspId, org.eclipse.core.runtime.IAdaptable input) throws org.eclipse.ui.WorkbenchException
- Opens a new page.
Note: Since release 2.0, a window is limited to contain at most one page. If a page exist in the window when this method is used, then another window is created for the new page. Callers are strongly recommended to use the
IWorkbench.openPerspectiveAPIs to programmatically show a perspective.- Specified by:
openPagein interfaceorg.eclipse.ui.IWorkbenchWindow
openPage
public org.eclipse.ui.IWorkbenchPage openPage(org.eclipse.core.runtime.IAdaptable input) throws org.eclipse.ui.WorkbenchException
- Opens a new page.
Note: Since release 2.0, a window is limited to contain at most one page. If a page exist in the window when this method is used, then another window is created for the new page. Callers are strongly recommended to use the
IWorkbench.openPerspectiveAPIs to programmatically show a perspective.- Specified by:
openPagein interfaceorg.eclipse.ui.IWorkbenchWindow
removePageListener
public void removePageListener(org.eclipse.ui.IPageListener l)
- Description copied from interface:
org.eclipse.ui.IPageService - Removes the given page listener.
Has no affect if an identical listener is not registered.
- Specified by:
removePageListenerin interfaceorg.eclipse.ui.IPageService
removePerspectiveListener
public void removePerspectiveListener(org.eclipse.ui.IPerspectiveListener l)
- Description copied from interface:
org.eclipse.ui.IPageService - Removes the given page's perspective listener.
Has no affect if an identical listener is not registered.
- Specified by:
removePerspectiveListenerin interfaceorg.eclipse.ui.IPageService
removePerspectiveShortcut
void removePerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor perspective, WorkbenchPage page)
- Remove the shortcut for a page.
unableToRestorePage
private org.eclipse.core.runtime.IStatus unableToRestorePage(org.eclipse.ui.IMemento pageMem)
restoreState
public org.eclipse.core.runtime.IStatus restoreState(org.eclipse.ui.IMemento memento, org.eclipse.ui.IPerspectiveDescriptor activeDescriptor)
restoreOldCoolBar
private boolean restoreOldCoolBar(org.eclipse.ui.IMemento coolbarMem)
- Restores cool item order from an old workbench.
readLayout
private boolean readLayout(org.eclipse.ui.IMemento memento, java.util.ArrayList itemIds, java.util.ArrayList wrapIndicies)
- Helper method used for restoring an old cool bar layout. This method reads the memento
and populatates the item id's and wrap indicies.
findAlphabeticalOrder
private org.eclipse.jface.action.IContributionItem findAlphabeticalOrder(java.lang.String startId, java.lang.String itemId, org.eclipse.jface.action.IContributionManager mgr)
- Returns the contribution item that the given contribution item should be inserted after.
run
public void run(boolean fork,
boolean cancelable,
org.eclipse.jface.operation.IRunnableWithProgress runnable)
throws java.lang.reflect.InvocationTargetException,
java.lang.InterruptedException
- Description copied from interface:
org.eclipse.jface.operation.IRunnableContext - Runs the given
IRunnableWithProgressin this context. For example, if this is aProgressMonitorDialogthen the runnable is run using this dialog's progress monitor.- Specified by:
runin interfaceorg.eclipse.jface.operation.IRunnableContext
saveAllPages
private boolean saveAllPages(boolean bConfirm)
- Save all of the pages. Returns true if the operation succeeded.
saveState
public org.eclipse.core.runtime.IStatus saveState(org.eclipse.ui.IMemento memento)
selectPerspectiveShortcut
void selectPerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor perspective, WorkbenchPage page, boolean selected)
- Select the shortcut for a perspective.
setActivePage
public void setActivePage(org.eclipse.ui.IWorkbenchPage in)
- Sets the active page within the window.
- Specified by:
setActivePagein interfaceorg.eclipse.ui.IWorkbenchWindow
toolBarChildrenExist
protected boolean toolBarChildrenExist()
- Returns whether or not children exist for the Window's toolbar control.
Overridden for coolbar support.
trackShellActivation
private void trackShellActivation(org.eclipse.swt.widgets.Shell shell)
- Hooks a listener to track the activation and
deactivation of the window's shell. Notifies
the active part and editor of the change
trackShellResize
private void trackShellResize(org.eclipse.swt.widgets.Shell newShell)
- Hooks a listener to track the resize of the window's
shell. Stores the new bounds if in normal state - that
is, not in minimized or maximized state)
updateActionBars
public void updateActionBars()
- update the action bars.
updateActionSets
public void updateActionSets()
- Update the visible action sets. This method is typically called
from a page when the user changes the visible action sets
within the prespective.
updatePerspectiveShortcut
void updatePerspectiveShortcut(org.eclipse.ui.IPerspectiveDescriptor oldDesc, org.eclipse.ui.IPerspectiveDescriptor newDesc, WorkbenchPage page)
- Updates the shorcut item
createProgressIndicator
private void createProgressIndicator(org.eclipse.swt.widgets.Shell shell)
- Create the progress indicator for the receiver.
getWindowConfigurer
WorkbenchWindowConfigurer getWindowConfigurer()
- Returns the unique object that applications use to configure this window.
IMPORTANT This method is declared package-private to prevent regular plug-ins from downcasting IWorkbenchWindow to WorkbenchWindow and getting hold of the workbench window configurer that would allow them to tamper with the workbench window. The workbench window configurer is available only to the application.
getAdvisor
private org.eclipse.ui.application.WorkbenchAdvisor getAdvisor()
- Returns the workbench advisor. Assumes the workbench
has been created already.
IMPORTANT This method is declared private to prevent regular plug-ins from downcasting IWorkbenchWindow to WorkbenchWindow and getting hold of the workbench advisor that would allow them to tamper with the workbench. The workbench advisor is internal to the application.
getWorkbenchImpl
private Workbench getWorkbenchImpl()
fillActionBars
public void fillActionBars(org.eclipse.ui.application.IActionBarConfigurer configurer, int flags)
- Creates a clone copy of the current action bars
initializeBounds
protected void initializeBounds()
- The
WorkbenchWindowimplementation of this method has the same logic asWindow's implementation, but without the resize check. We don't want to skip setting the bounds if the shell has been resized since a free resize event occurs on Windows when the menubar is set in configureShell.
getInitialSize
protected org.eclipse.swt.graphics.Point getInitialSize()
- The
WorkbenchWindowimplementation of this method delegates to the window configurer.- Since:
- 3.0
setCoolBarVisible
public void setCoolBarVisible(boolean visible)
- Since:
- 3.0
getCoolBarVisible
public boolean getCoolBarVisible()
- Since:
- 3.0
setPerspectiveBarVisible
public void setPerspectiveBarVisible(boolean visible)
- Since:
- 3.0
getPerspectiveBarVisible
public boolean getPerspectiveBarVisible()
- Since:
- 3.0
setStatusLineVisible
public void setStatusLineVisible(boolean visible)
- Since:
- 3.0
getStatusLineVisible
public boolean getStatusLineVisible()
- Since:
- 3.0
updateLayoutDataForContents
private void updateLayoutDataForContents()
- Note that this will only have an effect if the default implementation of
WorkbenchAdvisor.createWindowContents() has been invoked.
called IWorkbench
- Since:
- 3.0
getShowFastViewBars
public boolean getShowFastViewBars()
setLayoutDataForContents
private void setLayoutDataForContents()
- Set the layout data for the contents of the window.
getFastViewBar
public FastViewBar getFastViewBar()
- Returns the fast view bar.
getPerspectiveBar
public PerspectiveBarManager getPerspectiveBar()
- Returns the perspective bar.
getActionPresentation
protected ActionPresentation getActionPresentation()
showTopSeperator
protected boolean showTopSeperator()
- Description copied from class:
org.eclipse.jface.window.ApplicationWindow - Returns whether to show a top separator line between the menu bar
and the rest of the window contents. On some platforms such as the Mac,
the menu is separated from the main window already, so a separator line
is not desired.
createStatusLineManager
protected org.eclipse.jface.action.StatusLineManager createStatusLineManager()
- Delegate to the presentation factory.
- Since:
- 3.0
createStatusLine
protected void createStatusLine(org.eclipse.swt.widgets.Shell shell)
- Delegate to the presentation factory.
- Since:
- 3.0
updateFastViewBar
public void updateFastViewBar()
- Updates the fast view bar, if present.
TODO: The fast view bar should update itself as necessary.
All calls to this should be cleaned up.
- Since:
- 3.0
getProgressRegion
public org.eclipse.ui.internal.progress.ProgressRegion getProgressRegion()
addPerspectiveBarToTrim
public void addPerspectiveBarToTrim(org.eclipse.swt.widgets.Control control, int side)
- Add the argument perspective bar control to the argument side of this
window's trim.
- Since:
- 3.0
|
|||||||||
| Home >> All >> org >> eclipse >> ui >> [ internal overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC