Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.eclipse.ui.internal
Class WorkbenchPage  view WorkbenchPage download WorkbenchPage.java

java.lang.Object
  extended byorg.eclipse.ui.internal.CompatibleWorkbenchPage
      extended byorg.eclipse.ui.internal.WorkbenchPage
All Implemented Interfaces:
ICompatibleWorkbenchPage, org.eclipse.ui.IPartService, org.eclipse.ui.ISelectionService, org.eclipse.ui.IWorkbenchPage

public class WorkbenchPage
extends CompatibleWorkbenchPage
implements org.eclipse.ui.IWorkbenchPage

A collection of views and editors in a workbench.


Nested Class Summary
private  class WorkbenchPage.ActionSwitcher
          Manages editor contributions and action set part associations.
private  class WorkbenchPage.ActivationList
           
private  class WorkbenchPage.PerspectiveList
          Helper class to keep track of all opened perspective.
private  class WorkbenchPage.SashInfo
           
 
Field Summary
private  org.eclipse.ui.IActionBars actionBars
           
private  WorkbenchPage.ActionSwitcher actionSwitcher
           
private  WorkbenchPage.ActivationList activationList
           
private  org.eclipse.ui.IWorkbenchPart activePart
           
private  org.eclipse.swt.widgets.Composite composite
           
private  org.eclipse.ui.internal.registry.PerspectiveDescriptor deferredActivePersp
           
private  EditorManager editorMgr
           
private  EditorAreaHelper editorPresentation
           
private  org.eclipse.core.runtime.IAdaptable input
           
private  org.eclipse.ui.IEditorPart lastActiveEditor
           
private  NavigationHistory navigationHistory
           
private  PartListenerList partListeners
           
private  PartListenerList2 partListeners2
           
private  WorkbenchPage.PerspectiveList perspList
           
private  org.eclipse.jface.util.IPropertyChangeListener propertyChangeListener
           
private  org.eclipse.jface.util.ListenerList propertyChangeListeners
           
private  org.eclipse.swt.events.ControlListener resizeListener
           
private  PageSelectionService selectionService
           
private  java.util.HashMap stateMap
           
private  java.util.Set stickyPerspectives
           
private  ViewFactory viewFactory
           
private  WorkbenchWindow window
           
private  org.eclipse.ui.IWorkingSet workingSet
           
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPage
CHANGE_ACTION_SET_HIDE, CHANGE_ACTION_SET_SHOW, CHANGE_EDITOR_AREA_HIDE, CHANGE_EDITOR_AREA_SHOW, CHANGE_EDITOR_CLOSE, CHANGE_EDITOR_OPEN, CHANGE_FAST_VIEW_ADD, CHANGE_FAST_VIEW_REMOVE, CHANGE_RESET, CHANGE_RESET_COMPLETE, CHANGE_VIEW_HIDE, CHANGE_VIEW_SHOW, CHANGE_WORKING_SET_REPLACE, EDITOR_ID_ATTR, VIEW_ACTIVATE, VIEW_CREATE, VIEW_VISIBLE
 
Constructor Summary
WorkbenchPage(WorkbenchWindow w, org.eclipse.core.runtime.IAdaptable input)
          Constructs a page.
WorkbenchPage(WorkbenchWindow w, java.lang.String layoutID, org.eclipse.core.runtime.IAdaptable input)
          Constructs a new page with a given perspective and input.
 
Method Summary
 void activate(org.eclipse.ui.IWorkbenchPart part)
          Activates a part.
private  void activateOldPart(Perspective newPersp)
           
private  void activatePart(org.eclipse.ui.IWorkbenchPart part)
          Activates a part.
 void addFastView(org.eclipse.ui.IViewReference ref)
          Add a fast view.
protected  void addPart(org.eclipse.ui.IWorkbenchPartReference ref)
          Add a part to the activation list.
 void addPartListener(org.eclipse.ui.IPartListener l)
          Adds an IPartListener to the part service.
 void addPartListener(org.eclipse.ui.IPartListener2 l)
          Adds an IPartListener to the part service.
protected  void addPerspective(Perspective persp)
           
 void addPostSelectionListener(org.eclipse.ui.ISelectionListener listener)
          Adds the given post selection listener.It is equivalent to selection changed if the selection was triggered by the mouse but it has a delay if the selection is triggered by the keyboard arrows.
 void addPostSelectionListener(java.lang.String partId, org.eclipse.ui.ISelectionListener listener)
          Adds a part-specific selection listener which is notified when selection changes in the part with the given id.
 void addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
          Deprecated. individual views should store a working set if needed and register a property change listener directly with the working set manager to receive notification when the view working set is removed.
 void addSelectionListener(org.eclipse.ui.ISelectionListener listener)
          Adds the given selection listener.
 void addSelectionListener(java.lang.String partId, org.eclipse.ui.ISelectionListener listener)
          Adds a part-specific selection listener which is notified when selection changes in the part with the given id.
 void bringToTop(org.eclipse.ui.IWorkbenchPart part)
          Moves a part forward in the Z order of a perspective so it is visible.
private  org.eclipse.ui.IEditorPart busyOpenEditor(org.eclipse.ui.IEditorInput input, java.lang.String editorID, boolean activate)
          See IWorkbenchPage.openEditor
private  org.eclipse.ui.IEditorPart busyOpenEditorBatched(org.eclipse.ui.IEditorInput input, java.lang.String editorID, boolean activate)
          Do not call this method.
private  void busyResetPerspective()
          Resets the layout for the perspective.
private  void busySetPerspective(org.eclipse.ui.IPerspectiveDescriptor desc)
          Implements setPerspective.
private  void busyShowView(org.eclipse.ui.IViewPart part, int mode)
           
private  org.eclipse.ui.IViewPart busyShowView(java.lang.String viewID, java.lang.String secondaryID, int mode)
          Shows a view.
private  boolean certifyMode(int mode)
           
private  boolean certifyPart(org.eclipse.ui.IWorkbenchPart part)
          Returns whether a part exists in the current page.
 boolean close()
          Closes the perspective.
 boolean closeAllEditors(boolean save)
          See IWorkbenchPage
(package private)  void closeAllPerspectives()
          Closes all perspectives in the page.
 boolean closeAllSavedEditors()
          See IWorkbenchPage
 boolean closeEditor(org.eclipse.ui.IEditorPart editor, boolean save)
          See IWorkbenchPage#closeEditor
 boolean closeEditor(org.eclipse.ui.IEditorReference editorRef, boolean save)
          See IWorkbenchPage#closeEditor
 boolean closeEditors(org.eclipse.ui.IEditorReference[] editorRefs, boolean save)
          See IWorkbenchPage
(package private)  void closePerspective(org.eclipse.ui.IPerspectiveDescriptor desc, boolean save)
          Closes the specified perspective.
(package private)  void closePerspective(Perspective persp, boolean save, boolean closePage)
          Closes the specified perspective.
private  void createClientComposite()
          Creates the client composite.
private  Perspective createPerspective(org.eclipse.ui.internal.registry.PerspectiveDescriptor desc)
          Creates a new view set.
private  void deactivatePart(org.eclipse.ui.IWorkbenchPart part)
          Deactivates a part.
 void dispose()
          Cleanup.
private  void disposePart(org.eclipse.ui.IWorkbenchPartReference ref)
           
private  void disposePerspective(Perspective persp)
          Dispose a perspective.
 boolean editActionSets()
          Edits the action sets.
 org.eclipse.ui.IEditorPart findEditor(org.eclipse.ui.IEditorInput input)
          Returns the editor with the specified input.
 Perspective findPerspective(org.eclipse.ui.IPerspectiveDescriptor desc)
          Returns the first view manager with given ID.
private  void findSashParts(LayoutTree tree, PartPane.Sashes sashes, WorkbenchPage.SashInfo info)
           
 org.eclipse.ui.IViewPart findView(java.lang.String id)
          See IWorkbenchPage@findView.
 org.eclipse.ui.IViewReference findViewReference(java.lang.String viewId)
          Returns the view reference with the specified id.
 org.eclipse.ui.IViewReference findViewReference(java.lang.String viewId, java.lang.String secondaryId)
          Returns the view reference with the specified id and secondary id.
private  void firePartActivated(org.eclipse.ui.IWorkbenchPart part)
          Fire part activation out.
private  void firePartBroughtToTop(org.eclipse.ui.IWorkbenchPart part)
          Fire part brought to top out.
private  void firePartClosed(org.eclipse.ui.IWorkbenchPartReference ref)
          Fire part close out.
private  void firePartDeactivated(org.eclipse.ui.IWorkbenchPart part)
          Fire part deactivation out.
private  void firePartInputChanged(org.eclipse.ui.IWorkbenchPart part)
          Fire part input changed out.
 void firePartOpened(org.eclipse.ui.IWorkbenchPart part)
          Fire part open out.
private  void firePropertyChange(java.lang.String changeId, java.lang.Object oldValue, java.lang.Object newValue)
          Notify property change listeners about a property change.
 org.eclipse.ui.IActionBars getActionBars()
           
 org.eclipse.ui.internal.registry.IActionSetDescriptor[] getActionSets()
          Returns an array of the visible action sets.
 org.eclipse.ui.IEditorPart getActiveEditor()
          Returns the active editor open in this page.
 org.eclipse.ui.IViewReference getActiveFastView()
          Return the active fast view or null if there are no fast views or if there are all minimized.
 org.eclipse.ui.IWorkbenchPart getActivePart()
          Returns the active part.
 org.eclipse.ui.IWorkbenchPartReference getActivePartReference()
          Returns the active part reference.
 Perspective getActivePerspective()
          Returns the active perspective for the page, null if none.
(package private)  org.eclipse.ui.IWorkbenchPartReference[] getAllParts()
          Returns all parts that are owned by this page
 org.eclipse.swt.widgets.Composite getClientComposite()
          Returns the client composite.
 org.eclipse.ui.IEditorPart[] getDirtyEditors()
          Returns a list of dirty editors in this page.
protected  EditorManager getEditorManager()
          Answer the editor manager for this window.
 EditorAreaHelper getEditorPresentation()
          Answer the editor presentation.
 org.eclipse.ui.IEditorReference[] getEditorReferences()
          See IWorkbenchPage.
 int getEditorReuseThreshold()
          Returns the number of open editors before reusing editors.
 org.eclipse.ui.IEditorPart[] getEditors()
          See IWorkbenchPage.
 org.eclipse.ui.IViewReference[] getFastViews()
          Returns the docked views.
 org.eclipse.core.runtime.IAdaptable getInput()
          Returns the input for this page.
 java.lang.String getLabel()
          Returns the page label.
 org.eclipse.ui.INavigationHistory getNavigationHistory()
          Returns the navigation history which manages a list of entries keeping the history of places (positions, selection and editors) the user visited making it easier to the user to move back and forward without losing context.
 java.util.ArrayList getNewWizardActionIds()
          Returns the new wizard actions the page.
protected  org.eclipse.ui.IPerspectiveDescriptor[] getOpenedPerspectives()
          Returns an iterator over the opened perspectives
(package private)  org.eclipse.ui.IWorkbenchPartReference[] getOpenParts()
          Returns all open parts that are owned by this page (that is, all parts for which a part opened event would have been sent -- these would be activated parts whose controls have already been created.
 org.eclipse.ui.IPerspectiveDescriptor getPerspective()
          Returns the perspective.
 java.util.ArrayList getPerspectiveActionIds()
          Returns the perspective actions for this page.
 PerspectiveHelper getPerspectivePresentation()
          Answer the perspective presentation.
 org.eclipse.ui.IWorkbenchPartReference getReference(org.eclipse.ui.IWorkbenchPart part)
           
 org.eclipse.jface.viewers.ISelection getSelection()
          Returns the current selection in the active part.
 org.eclipse.jface.viewers.ISelection getSelection(java.lang.String partId)
          Returns the current selection in the part with the given id.
 java.util.ArrayList getShowInPartIds()
          Returns the ids of the parts to list in the Show In...
 java.util.ArrayList getShowViewActionIds()
          Returns the show view actions the page.
 org.eclipse.ui.IEditorReference[] getSortedEditors()
           
 org.eclipse.ui.IWorkbenchPartReference[] getSortedParts()
           
protected  org.eclipse.ui.IPerspectiveDescriptor[] getSortedPerspectives()
           
protected  java.util.HashMap getStateMap()
           
protected  WorkbenchWindow getUnprotectedWindow()
          Returns the unprotected window.
 ViewFactory getViewFactory()
           
 org.eclipse.ui.IViewReference[] getViewReferences()
          See IWorkbenchPage.
private  org.eclipse.ui.IViewReference[] getViewReferenceStack(org.eclipse.ui.IViewPart part)
          Find the stack of view references stacked with this view part.
 org.eclipse.ui.IViewPart[] getViews()
          See IWorkbenchPage.
 org.eclipse.ui.IViewPart[] getViewStack(org.eclipse.ui.IViewPart part)
          Returns an array of IViewParts that are stacked with the given part.
 org.eclipse.ui.IWorkbenchWindow getWorkbenchWindow()
          See IWorkbenchPage.
 org.eclipse.ui.IWorkingSet getWorkingSet()
          Deprecated. individual views should store a working set if needed
 void hideActionSet(java.lang.String actionSetID)
          Hides an action set in this page.
 void hideFastView()
          Hides the active fast view.
 void hideView(org.eclipse.ui.IViewPart view)
          See IPerspective
 void hideView(org.eclipse.ui.IViewReference ref)
          Hides the given view that belongs to the reference, if any.
private  void hideView(Perspective persp, org.eclipse.ui.IViewReference ref)
           
private  void init(WorkbenchWindow w, java.lang.String layoutID, org.eclipse.core.runtime.IAdaptable input)
          Initialize the page.
 boolean isEditorAreaVisible()
          See IWorkbenchPage.
 boolean isEditorPinned(org.eclipse.ui.IEditorPart editor)
          See IWorkbenchPage.
 boolean isFastView(org.eclipse.ui.IViewReference ref)
          Returns whether the view is fast.
 boolean isFixedLayout()
          Returns whether the layout of the active perspective is fixed.
 boolean isPartVisible(org.eclipse.ui.IWorkbenchPart part)
          See IWorkbenchPage.
protected  boolean isSaveNeeded()
          Return true if the perspective has a dirty editor.
 boolean isZoomed()
          Returns whether the page is zoomed.
private  boolean needToZoomOut(org.eclipse.ui.IWorkbenchPart part)
          Returns true if the window needs to unzoom for the given IWorkbenchPart to be seen by the user.
protected  void onActivate()
          This method is called when the page is activated.
protected  void onDeactivate()
          This method is called when the page is deactivated.
 org.eclipse.ui.IEditorPart openEditor(org.eclipse.ui.IEditorInput input, java.lang.String editorID)
          See IWorkbenchPage.
 org.eclipse.ui.IEditorPart openEditor(org.eclipse.ui.IEditorInput input, java.lang.String editorID, boolean activate)
          See IWorkbenchPage.
 void openTracker(ViewPane pane)
          Open the tracker to allow the user to move the specified part using keyboard.
private  boolean partChangeAffectsZoom(org.eclipse.ui.IWorkbenchPartReference ref)
          Returns whether changes to a part will affect zoom.
 void performedShowIn(java.lang.String partId)
          The user successfully performed a Show In...
(package private)  void refreshActiveView()
           
 void removeFastView(org.eclipse.ui.IViewReference ref)
          Removes a fast view.
protected  void removePart(org.eclipse.ui.IWorkbenchPartReference ref)
          Remove a part from the activation list.
 void removePartListener(org.eclipse.ui.IPartListener l)
          Removes an IPartListener from the part service.
 void removePartListener(org.eclipse.ui.IPartListener2 l)
          Removes an IPartListener from the part service.
 void removePostSelectionListener(org.eclipse.ui.ISelectionListener listener)
          Removes the given post selection listener.
 void removePostSelectionListener(java.lang.String partId, org.eclipse.ui.ISelectionListener listener)
          Removes the given part-specific post selection listener.
 void removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
          Deprecated. individual views should store a working set if needed and register a property change listener directly with the working set manager to receive notification when the view working set is removed.
 void removeSelectionListener(org.eclipse.ui.ISelectionListener listener)
          Removes the given selection listener.
 void removeSelectionListener(java.lang.String partId, org.eclipse.ui.ISelectionListener listener)
          Removes the given part-specific selection listener.
 void requestActivation(org.eclipse.ui.IWorkbenchPart part)
          This method is called when a part is activated by clicking within it.
 void resetPerspective()
          Resets the layout for the perspective.
protected  void resetToolBarLayout()
          Restore the toolbar layout for the active perspective.
 void resizeView(org.eclipse.ui.IViewPart part, int width, int height)
          Allow for programmatically resizing a part.
 org.eclipse.core.runtime.IStatus restoreState(org.eclipse.ui.IMemento memento, org.eclipse.ui.IPerspectiveDescriptor activeDescritor)
          Restore this page from the memento and ensure that the active perspective is equals the active descriptor otherwise create a new perspective for that descriptor.
 void reuseEditor(org.eclipse.ui.IReusableEditor editor, org.eclipse.ui.IEditorInput input)
          See IWorkbenchPage.
 boolean saveAllEditors(boolean confirm)
          See IWorkbenchPage
 boolean saveEditor(org.eclipse.ui.IEditorPart editor, boolean confirm)
          Saves an editors in the workbench.
protected  boolean savePart(org.eclipse.ui.ISaveablePart saveable, org.eclipse.ui.IWorkbenchPart part, boolean confirm)
           
 void savePerspective()
          Saves the current perspective.
 void savePerspectiveAs(org.eclipse.ui.IPerspectiveDescriptor newDesc)
          Saves the perspective.
 org.eclipse.core.runtime.IStatus saveState(org.eclipse.ui.IMemento memento)
          Save the state of the page.
private  void setActivePart(org.eclipse.ui.IWorkbenchPart newPart)
          Sets the active part.
 void setEditorAreaVisible(boolean showEditorArea)
          See IWorkbenchPage.
 void setEditorReuseThreshold(int openEditors)
          Set the number of open editors before reusing editors.
 void setPerspective(org.eclipse.ui.IPerspectiveDescriptor desc)
          Sets the perspective.
private  void setPerspective(Perspective newPersp)
          Sets the layout of the page.
 void setWorkingSet(org.eclipse.ui.IWorkingSet newWorkingSet)
          Deprecated. individual views should store a working set if needed
 void showActionSet(java.lang.String actionSetID)
          Shows an action set in this page.
private  void showEditor(boolean activate, org.eclipse.ui.IEditorPart editor)
           
 org.eclipse.ui.IViewPart showView(java.lang.String viewID)
          See IWorkbenchPage.
 org.eclipse.ui.IViewPart showView(java.lang.String viewID, java.lang.String secondaryID, int mode)
          Shows a view in this page with the given id and secondary id.
 void sortShowInPartIds(java.util.ArrayList partIds)
          Sorts the given collection of show in target part ids in MRU order.
 void toggleFastView(org.eclipse.ui.IViewReference ref)
          Toggles the visibility of a fast view.
 void toggleZoom(org.eclipse.ui.IWorkbenchPartReference ref)
          Zoom in on a part.
 void updateActionBars()
          updateActionBars method comment.
private  void updateTabList(org.eclipse.ui.IWorkbenchPart part)
          Sets the tab list of this page's composite appropriately when a part is activated.
 void updateTitle(org.eclipse.ui.IViewReference ref)
          The title of the given part has changed.
private  void updateVisibility(Perspective oldPersp, Perspective newPersp)
           
(package private)  void zoomOut()
          Zooms out a zoomed in part.
private  void zoomOutIfNecessary(org.eclipse.ui.IWorkbenchPart part)
          Zooms out a zoomed in part if it is necessary to do so for the user to view the IWorkbenchPart that is the argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

window

private WorkbenchWindow window

input

private org.eclipse.core.runtime.IAdaptable input

workingSet

private org.eclipse.ui.IWorkingSet workingSet

composite

private org.eclipse.swt.widgets.Composite composite

resizeListener

private org.eclipse.swt.events.ControlListener resizeListener

activePart

private org.eclipse.ui.IWorkbenchPart activePart

activationList

private WorkbenchPage.ActivationList activationList

lastActiveEditor

private org.eclipse.ui.IEditorPart lastActiveEditor

editorMgr

private EditorManager editorMgr

editorPresentation

private EditorAreaHelper editorPresentation

partListeners

private PartListenerList partListeners

partListeners2

private PartListenerList2 partListeners2

propertyChangeListeners

private org.eclipse.jface.util.ListenerList propertyChangeListeners

selectionService

private PageSelectionService selectionService

actionBars

private org.eclipse.ui.IActionBars actionBars

viewFactory

private ViewFactory viewFactory

perspList

private WorkbenchPage.PerspectiveList perspList

deferredActivePersp

private org.eclipse.ui.internal.registry.PerspectiveDescriptor deferredActivePersp

navigationHistory

private NavigationHistory navigationHistory

stateMap

private java.util.HashMap stateMap

propertyChangeListener

private org.eclipse.jface.util.IPropertyChangeListener propertyChangeListener

stickyPerspectives

private java.util.Set stickyPerspectives

actionSwitcher

private WorkbenchPage.ActionSwitcher actionSwitcher
Constructor Detail

WorkbenchPage

public WorkbenchPage(WorkbenchWindow w,
                     java.lang.String layoutID,
                     org.eclipse.core.runtime.IAdaptable input)
              throws org.eclipse.ui.WorkbenchException
Constructs a new page with a given perspective and input.


WorkbenchPage

public WorkbenchPage(WorkbenchWindow w,
                     org.eclipse.core.runtime.IAdaptable input)
              throws org.eclipse.ui.WorkbenchException
Constructs a page. restoreState(IMemento) should be called to restore this page from data stored in a persistance file.

Method Detail

activate

public void activate(org.eclipse.ui.IWorkbenchPart part)
Activates a part. The part will be brought to the front and given focus.

Specified by:
activate in interface org.eclipse.ui.IWorkbenchPage

activatePart

private void activatePart(org.eclipse.ui.IWorkbenchPart part)
Activates a part. The part is given focus, the pane is hilighted.


addFastView

public void addFastView(org.eclipse.ui.IViewReference ref)
Add a fast view.


addPartListener

public void addPartListener(org.eclipse.ui.IPartListener l)
Adds an IPartListener to the part service.

Specified by:
addPartListener in interface org.eclipse.ui.IPartService

addPartListener

public void addPartListener(org.eclipse.ui.IPartListener2 l)
Adds an IPartListener to the part service.

Specified by:
addPartListener in interface org.eclipse.ui.IPartService

addPropertyChangeListener

public void addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
Deprecated. individual views should store a working set if needed and register a property change listener directly with the working set manager to receive notification when the view working set is removed.

Implements IWorkbenchPage

Specified by:
addPropertyChangeListener in interface org.eclipse.ui.IWorkbenchPage
Since:
2.0

addSelectionListener

public void addSelectionListener(org.eclipse.ui.ISelectionListener listener)
Description copied from interface: org.eclipse.ui.ISelectionService
Adds the given selection listener. Has no effect if an identical listener is already registered.

Specified by:
addSelectionListener in interface org.eclipse.ui.ISelectionService

addSelectionListener

public void addSelectionListener(java.lang.String partId,
                                 org.eclipse.ui.ISelectionListener listener)
Description copied from interface: org.eclipse.ui.ISelectionService
Adds a part-specific selection listener which is notified when selection changes in the part with the given id. This is independent of part activation - the part need not be active for notification to be sent.

When the part is created, the listener is passed the part's initial selection. When the part is disposed, the listener is passed a null selection, but only if the listener implements INullSelectionListener.

Specified by:
addSelectionListener in interface org.eclipse.ui.ISelectionService

addPostSelectionListener

public void addPostSelectionListener(org.eclipse.ui.ISelectionListener listener)
Description copied from interface: org.eclipse.ui.ISelectionService
Adds the given post selection listener.It is equivalent to selection changed if the selection was triggered by the mouse but it has a delay if the selection is triggered by the keyboard arrows. Has no effect if an identical listener is already registered. Note: Works only for StructuredViewer(s).

Specified by:
addPostSelectionListener in interface org.eclipse.ui.ISelectionService

addPostSelectionListener

public void addPostSelectionListener(java.lang.String partId,
                                     org.eclipse.ui.ISelectionListener listener)
Description copied from interface: org.eclipse.ui.ISelectionService
Adds a part-specific selection listener which is notified when selection changes in the part with the given id. This is independent of part activation - the part need not be active for notification to be sent.

When the part is created, the listener is passed the part's initial selection. When the part is disposed, the listener is passed a null selection, but only if the listener implements INullSelectionListener.

Specified by:
addPostSelectionListener in interface org.eclipse.ui.ISelectionService

bringToTop

public void bringToTop(org.eclipse.ui.IWorkbenchPart part)
Moves a part forward in the Z order of a perspective so it is visible.

Specified by:
bringToTop in interface org.eclipse.ui.IWorkbenchPage

busyResetPerspective

private void busyResetPerspective()
Resets the layout for the perspective. The active part in the old layout is activated in the new layout for consistent user context. Assumes the busy cursor is active.


busySetPerspective

private void busySetPerspective(org.eclipse.ui.IPerspectiveDescriptor desc)
Implements setPerspective. Assumes that busy cursor is active.


busyShowView

private org.eclipse.ui.IViewPart busyShowView(java.lang.String viewID,
                                              java.lang.String secondaryID,
                                              int mode)
                                       throws org.eclipse.ui.PartInitException
Shows a view. Assumes that a busy cursor is active.


busyShowView

private void busyShowView(org.eclipse.ui.IViewPart part,
                          int mode)

certifyPart

private boolean certifyPart(org.eclipse.ui.IWorkbenchPart part)
Returns whether a part exists in the current page.


close

public boolean close()
Closes the perspective.

Specified by:
close in interface org.eclipse.ui.IWorkbenchPage

closeAllSavedEditors

public boolean closeAllSavedEditors()
See IWorkbenchPage


closeAllEditors

public boolean closeAllEditors(boolean save)
See IWorkbenchPage

Specified by:
closeAllEditors in interface org.eclipse.ui.IWorkbenchPage

closeEditors

public boolean closeEditors(org.eclipse.ui.IEditorReference[] editorRefs,
                            boolean save)
See IWorkbenchPage

Specified by:
closeEditors in interface org.eclipse.ui.IWorkbenchPage

closeEditor

public boolean closeEditor(org.eclipse.ui.IEditorReference editorRef,
                           boolean save)
See IWorkbenchPage#closeEditor


closeEditor

public boolean closeEditor(org.eclipse.ui.IEditorPart editor,
                           boolean save)
See IWorkbenchPage#closeEditor

Specified by:
closeEditor in interface org.eclipse.ui.IWorkbenchPage

closePerspective

void closePerspective(org.eclipse.ui.IPerspectiveDescriptor desc,
                      boolean save)
Closes the specified perspective. If last perspective, then entire page is closed.


closePerspective

void closePerspective(Perspective persp,
                      boolean save,
                      boolean closePage)
Closes the specified perspective. If last perspective, then entire page is closed.


closeAllPerspectives

void closeAllPerspectives()
Closes all perspectives in the page. The page is kept so as not to lose the input.


createClientComposite

private void createClientComposite()
Creates the client composite.


createPerspective

private Perspective createPerspective(org.eclipse.ui.internal.registry.PerspectiveDescriptor desc)
Creates a new view set. Return null on failure.


openTracker

public void openTracker(ViewPane pane)
Open the tracker to allow the user to move the specified part using keyboard.


addPart

protected void addPart(org.eclipse.ui.IWorkbenchPartReference ref)
Add a part to the activation list.


removePart

protected void removePart(org.eclipse.ui.IWorkbenchPartReference ref)
Remove a part from the activation list.


deactivatePart

private void deactivatePart(org.eclipse.ui.IWorkbenchPart part)
Deactivates a part. The pane is unhilighted.


disposePart

private void disposePart(org.eclipse.ui.IWorkbenchPartReference ref)

dispose

public void dispose()
Cleanup.


disposePerspective

private void disposePerspective(Perspective persp)
Dispose a perspective.


getNavigationHistory

public org.eclipse.ui.INavigationHistory getNavigationHistory()
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Returns the navigation history which manages a list of entries keeping the history of places (positions, selection and editors) the user visited making it easier to the user to move back and forward without losing context.

Specified by:
getNavigationHistory in interface org.eclipse.ui.IWorkbenchPage

editActionSets

public boolean editActionSets()
Edits the action sets.


findPerspective

public Perspective findPerspective(org.eclipse.ui.IPerspectiveDescriptor desc)
Returns the first view manager with given ID.


findView

public org.eclipse.ui.IViewPart findView(java.lang.String id)
See IWorkbenchPage@findView.

Specified by:
findView in interface org.eclipse.ui.IWorkbenchPage

findViewReference

public org.eclipse.ui.IViewReference findViewReference(java.lang.String viewId)
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Returns the view reference with the specified id.

Specified by:
findViewReference in interface org.eclipse.ui.IWorkbenchPage

findViewReference

public org.eclipse.ui.IViewReference findViewReference(java.lang.String viewId,
                                                       java.lang.String secondaryId)
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Returns the view reference with the specified id and secondary id.

Specified by:
findViewReference in interface org.eclipse.ui.IWorkbenchPage

firePartActivated

private void firePartActivated(org.eclipse.ui.IWorkbenchPart part)
Fire part activation out.


firePartBroughtToTop

private void firePartBroughtToTop(org.eclipse.ui.IWorkbenchPart part)
Fire part brought to top out.


firePartClosed

private void firePartClosed(org.eclipse.ui.IWorkbenchPartReference ref)
Fire part close out.


firePartDeactivated

private void firePartDeactivated(org.eclipse.ui.IWorkbenchPart part)
Fire part deactivation out.


firePartOpened

public void firePartOpened(org.eclipse.ui.IWorkbenchPart part)
Fire part open out.


firePartInputChanged

private void firePartInputChanged(org.eclipse.ui.IWorkbenchPart part)
Fire part input changed out.


firePropertyChange

private void firePropertyChange(java.lang.String changeId,
                                java.lang.Object oldValue,
                                java.lang.Object newValue)
Notify property change listeners about a property change.


getActionBars

public org.eclipse.ui.IActionBars getActionBars()

getActionSets

public org.eclipse.ui.internal.registry.IActionSetDescriptor[] getActionSets()
Returns an array of the visible action sets.


getActiveEditor

public org.eclipse.ui.IEditorPart getActiveEditor()
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Returns the active editor open in this page.

This is the visible editor on the page, or, if there is more than one visible editor, this is the one most recently brought to top.

Specified by:
getActiveEditor in interface org.eclipse.ui.IWorkbenchPage

getActivePart

public org.eclipse.ui.IWorkbenchPart getActivePart()
Description copied from interface: org.eclipse.ui.IPartService
Returns the active part.

Specified by:
getActivePart in interface org.eclipse.ui.IPartService

getActivePartReference

public org.eclipse.ui.IWorkbenchPartReference getActivePartReference()
Description copied from interface: org.eclipse.ui.IPartService
Returns the active part reference.

Specified by:
getActivePartReference in interface org.eclipse.ui.IPartService

getActivePerspective

public Perspective getActivePerspective()
Returns the active perspective for the page, null if none.


getClientComposite

public org.eclipse.swt.widgets.Composite getClientComposite()
Returns the client composite.


getEditorManager

protected EditorManager getEditorManager()
Answer the editor manager for this window.


getPerspectivePresentation

public PerspectiveHelper getPerspectivePresentation()
Answer the perspective presentation.


getEditorPresentation

public EditorAreaHelper getEditorPresentation()
Answer the editor presentation.


getEditors

public org.eclipse.ui.IEditorPart[] getEditors()
See IWorkbenchPage.

Specified by:
getEditors in interface org.eclipse.ui.IWorkbenchPage

getDirtyEditors

public org.eclipse.ui.IEditorPart[] getDirtyEditors()
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Returns a list of dirty editors in this page.

Specified by:
getDirtyEditors in interface org.eclipse.ui.IWorkbenchPage

findEditor

public org.eclipse.ui.IEditorPart findEditor(org.eclipse.ui.IEditorInput input)
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Returns the editor with the specified input. Returns null if there is no opened editor with that input.

Specified by:
findEditor in interface org.eclipse.ui.IWorkbenchPage

getEditorReferences

public org.eclipse.ui.IEditorReference[] getEditorReferences()
See IWorkbenchPage.

Specified by:
getEditorReferences in interface org.eclipse.ui.IWorkbenchPage

getFastViews

public org.eclipse.ui.IViewReference[] getFastViews()
Returns the docked views.


getInput

public org.eclipse.core.runtime.IAdaptable getInput()
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Returns the input for this page.

Specified by:
getInput in interface org.eclipse.ui.IWorkbenchPage

getLabel

public java.lang.String getLabel()
Returns the page label. This is a combination of the page input and active perspective.

Specified by:
getLabel in interface org.eclipse.ui.IWorkbenchPage

getNewWizardActionIds

public java.util.ArrayList getNewWizardActionIds()
Returns the new wizard actions the page. This is List of Strings.


getPerspective

public org.eclipse.ui.IPerspectiveDescriptor getPerspective()
Returns the perspective.

Specified by:
getPerspective in interface org.eclipse.ui.IWorkbenchPage

getPerspectiveActionIds

public java.util.ArrayList getPerspectiveActionIds()
Returns the perspective actions for this page. This is List of Strings.


getSelection

public org.eclipse.jface.viewers.ISelection getSelection()
Description copied from interface: org.eclipse.ui.ISelectionService
Returns the current selection in the active part. If the selection in the active part is undefined (the active part has no selection provider) the result will be null.

Specified by:
getSelection in interface org.eclipse.ui.ISelectionService

getSelection

public org.eclipse.jface.viewers.ISelection getSelection(java.lang.String partId)
Description copied from interface: org.eclipse.ui.ISelectionService
Returns the current selection in the part with the given id. If the part is not open, or if the selection in the active part is undefined (the active part has no selection provider) the result will be null.

Specified by:
getSelection in interface org.eclipse.ui.ISelectionService

getShowInPartIds

public java.util.ArrayList getShowInPartIds()
Returns the ids of the parts to list in the Show In... prompter. This is a List of Strings.


performedShowIn

public void performedShowIn(java.lang.String partId)
The user successfully performed a Show In... action on the specified part. Update the list of Show In items accordingly.


sortShowInPartIds

public void sortShowInPartIds(java.util.ArrayList partIds)
Sorts the given collection of show in target part ids in MRU order.


getShowViewActionIds

public java.util.ArrayList getShowViewActionIds()
Returns the show view actions the page. This is a List of Strings.


getUnprotectedWindow

protected WorkbenchWindow getUnprotectedWindow()
Returns the unprotected window.


getViewFactory

public ViewFactory getViewFactory()

getAllParts

org.eclipse.ui.IWorkbenchPartReference[] getAllParts()
Returns all parts that are owned by this page


getOpenParts

org.eclipse.ui.IWorkbenchPartReference[] getOpenParts()
Returns all open parts that are owned by this page (that is, all parts for which a part opened event would have been sent -- these would be activated parts whose controls have already been created.


getViewReferences

public org.eclipse.ui.IViewReference[] getViewReferences()
See IWorkbenchPage.

Specified by:
getViewReferences in interface org.eclipse.ui.IWorkbenchPage

getViews

public org.eclipse.ui.IViewPart[] getViews()
See IWorkbenchPage.

Specified by:
getViews in interface org.eclipse.ui.IWorkbenchPage

getWorkbenchWindow

public org.eclipse.ui.IWorkbenchWindow getWorkbenchWindow()
See IWorkbenchPage.

Specified by:
getWorkbenchWindow in interface org.eclipse.ui.IWorkbenchPage

getWorkingSet

public org.eclipse.ui.IWorkingSet getWorkingSet()
Deprecated. individual views should store a working set if needed

Implements IWorkbenchPage

Specified by:
getWorkingSet in interface org.eclipse.ui.IWorkbenchPage
Since:
2.0

hideActionSet

public void hideActionSet(java.lang.String actionSetID)
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Hides an action set in this page.

In most cases where this method is used the caller is tightly coupled to a particular action set. They define it in the registry and may make it visible in certain scenarios by calling showActionSet. A static variable is often used to identify the action set id in caller code.

Specified by:
hideActionSet in interface org.eclipse.ui.IWorkbenchPage

hideView

public void hideView(org.eclipse.ui.IViewReference ref)
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Hides the given view that belongs to the reference, if any.

Specified by:
hideView in interface org.eclipse.ui.IWorkbenchPage

refreshActiveView

void refreshActiveView()

hideView

public void hideView(org.eclipse.ui.IViewPart view)
See IPerspective

Specified by:
hideView in interface org.eclipse.ui.IWorkbenchPage

hideView

private void hideView(Perspective persp,
                      org.eclipse.ui.IViewReference ref)

init

private void init(WorkbenchWindow w,
                  java.lang.String layoutID,
                  org.eclipse.core.runtime.IAdaptable input)
           throws org.eclipse.ui.WorkbenchException
Initialize the page.


isPartVisible

public boolean isPartVisible(org.eclipse.ui.IWorkbenchPart part)
See IWorkbenchPage.

Specified by:
isPartVisible in interface org.eclipse.ui.IWorkbenchPage

isEditorAreaVisible

public boolean isEditorAreaVisible()
See IWorkbenchPage.

Specified by:
isEditorAreaVisible in interface org.eclipse.ui.IWorkbenchPage

isFastView

public boolean isFastView(org.eclipse.ui.IViewReference ref)
Returns whether the view is fast.


isFixedLayout

public boolean isFixedLayout()
Returns whether the layout of the active perspective is fixed.


getActiveFastView

public org.eclipse.ui.IViewReference getActiveFastView()
Return the active fast view or null if there are no fast views or if there are all minimized.


isSaveNeeded

protected boolean isSaveNeeded()
Return true if the perspective has a dirty editor.


isZoomed

public boolean isZoomed()
Returns whether the page is zoomed.


needToZoomOut

private boolean needToZoomOut(org.eclipse.ui.IWorkbenchPart part)
Returns true if the window needs to unzoom for the given IWorkbenchPart to be seen by the user. Returns false otherwise.


onActivate

protected void onActivate()
This method is called when the page is activated.


onDeactivate

protected void onDeactivate()
This method is called when the page is deactivated.


reuseEditor

public void reuseEditor(org.eclipse.ui.IReusableEditor editor,
                        org.eclipse.ui.IEditorInput input)
See IWorkbenchPage.

Specified by:
reuseEditor in interface org.eclipse.ui.IWorkbenchPage

openEditor

public org.eclipse.ui.IEditorPart openEditor(org.eclipse.ui.IEditorInput input,
                                             java.lang.String editorID)
                                      throws org.eclipse.ui.PartInitException
See IWorkbenchPage.

Specified by:
openEditor in interface org.eclipse.ui.IWorkbenchPage

openEditor

public org.eclipse.ui.IEditorPart openEditor(org.eclipse.ui.IEditorInput input,
                                             java.lang.String editorID,
                                             boolean activate)
                                      throws org.eclipse.ui.PartInitException
See IWorkbenchPage.

Specified by:
openEditor in interface org.eclipse.ui.IWorkbenchPage

busyOpenEditor

private org.eclipse.ui.IEditorPart busyOpenEditor(org.eclipse.ui.IEditorInput input,
                                                  java.lang.String editorID,
                                                  boolean activate)
                                           throws org.eclipse.ui.PartInitException
See IWorkbenchPage.openEditor


busyOpenEditorBatched

private org.eclipse.ui.IEditorPart busyOpenEditorBatched(org.eclipse.ui.IEditorInput input,
                                                         java.lang.String editorID,
                                                         boolean activate)
                                                  throws org.eclipse.ui.PartInitException
Do not call this method. Use busyOpenEditor.


showEditor

private void showEditor(boolean activate,
                        org.eclipse.ui.IEditorPart editor)

isEditorPinned

public boolean isEditorPinned(org.eclipse.ui.IEditorPart editor)
See IWorkbenchPage.

Specified by:
isEditorPinned in interface org.eclipse.ui.IWorkbenchPage

partChangeAffectsZoom

private boolean partChangeAffectsZoom(org.eclipse.ui.IWorkbenchPartReference ref)
Returns whether changes to a part will affect zoom. There are a few conditions for this .. - we are zoomed. - the part is contained in the main window. - the part is not the zoom part - the part is not a fast view - the part and the zoom part are not in the same editor workbook


removeFastView

public void removeFastView(org.eclipse.ui.IViewReference ref)
Removes a fast view.


removePartListener

public void removePartListener(org.eclipse.ui.IPartListener l)
Removes an IPartListener from the part service.

Specified by:
removePartListener in interface org.eclipse.ui.IPartService

removePartListener

public void removePartListener(org.eclipse.ui.IPartListener2 l)
Removes an IPartListener from the part service.

Specified by:
removePartListener in interface org.eclipse.ui.IPartService

removePropertyChangeListener

public void removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener listener)
Deprecated. individual views should store a working set if needed and register a property change listener directly with the working set manager to receive notification when the view working set is removed.

Implements IWorkbenchPage

Specified by:
removePropertyChangeListener in interface org.eclipse.ui.IWorkbenchPage
Since:
2.0

removeSelectionListener

public void removeSelectionListener(org.eclipse.ui.ISelectionListener listener)
Description copied from interface: org.eclipse.ui.ISelectionService
Removes the given selection listener. Has no effect if an identical listener is not registered.

Specified by:
removeSelectionListener in interface org.eclipse.ui.ISelectionService

removeSelectionListener

public void removeSelectionListener(java.lang.String partId,
                                    org.eclipse.ui.ISelectionListener listener)
Description copied from interface: org.eclipse.ui.ISelectionService
Removes the given part-specific selection listener. Has no effect if an identical listener is not registered for the given part id.

Specified by:
removeSelectionListener in interface org.eclipse.ui.ISelectionService

removePostSelectionListener

public void removePostSelectionListener(org.eclipse.ui.ISelectionListener listener)
Description copied from interface: org.eclipse.ui.ISelectionService
Removes the given post selection listener. Has no effect if an identical listener is not registered.

Specified by:
removePostSelectionListener in interface org.eclipse.ui.ISelectionService

removePostSelectionListener

public void removePostSelectionListener(java.lang.String partId,
                                        org.eclipse.ui.ISelectionListener listener)
Description copied from interface: org.eclipse.ui.ISelectionService
Removes the given part-specific post selection listener. Has no effect if an identical listener is not registered for the given part id.

Specified by:
removePostSelectionListener in interface org.eclipse.ui.ISelectionService

requestActivation

public void requestActivation(org.eclipse.ui.IWorkbenchPart part)
This method is called when a part is activated by clicking within it. In response, the part, the pane, and all of its actions will be activated. In the current design this method is invoked by the part pane when the pane, the part, or any children gain focus.


resetPerspective

public void resetPerspective()
Resets the layout for the perspective. The active part in the old layout is activated in the new layout for consistent user context.

Specified by:
resetPerspective in interface org.eclipse.ui.IWorkbenchPage

restoreState

public org.eclipse.core.runtime.IStatus restoreState(org.eclipse.ui.IMemento memento,
                                                     org.eclipse.ui.IPerspectiveDescriptor activeDescritor)
Restore this page from the memento and ensure that the active perspective is equals the active descriptor otherwise create a new perspective for that descriptor. If activeDescriptor is null active the old perspective.


saveAllEditors

public boolean saveAllEditors(boolean confirm)
See IWorkbenchPage

Specified by:
saveAllEditors in interface org.eclipse.ui.IWorkbenchPage

savePart

protected boolean savePart(org.eclipse.ui.ISaveablePart saveable,
                           org.eclipse.ui.IWorkbenchPart part,
                           boolean confirm)

saveEditor

public boolean saveEditor(org.eclipse.ui.IEditorPart editor,
                          boolean confirm)
Saves an editors in the workbench. If confirm is true the user is prompted to confirm the command.

Specified by:
saveEditor in interface org.eclipse.ui.IWorkbenchPage

savePerspective

public void savePerspective()
Saves the current perspective.

Specified by:
savePerspective in interface org.eclipse.ui.IWorkbenchPage

savePerspectiveAs

public void savePerspectiveAs(org.eclipse.ui.IPerspectiveDescriptor newDesc)
Saves the perspective.

Specified by:
savePerspectiveAs in interface org.eclipse.ui.IWorkbenchPage

saveState

public org.eclipse.core.runtime.IStatus saveState(org.eclipse.ui.IMemento memento)
Save the state of the page.


setActivePart

private void setActivePart(org.eclipse.ui.IWorkbenchPart newPart)
Sets the active part.


setEditorAreaVisible

public void setEditorAreaVisible(boolean showEditorArea)
See IWorkbenchPage.

Specified by:
setEditorAreaVisible in interface org.eclipse.ui.IWorkbenchPage

setPerspective

private void setPerspective(Perspective newPersp)
Sets the layout of the page. Assumes the new perspective is not null. Keeps the active part if possible. Updates the window menubar and toolbar if necessary.


updateVisibility

private void updateVisibility(Perspective oldPersp,
                              Perspective newPersp)

activateOldPart

private void activateOldPart(Perspective newPersp)

setPerspective

public void setPerspective(org.eclipse.ui.IPerspectiveDescriptor desc)
Sets the perspective.

Specified by:
setPerspective in interface org.eclipse.ui.IWorkbenchPage

resetToolBarLayout

protected void resetToolBarLayout()
Restore the toolbar layout for the active perspective.


setWorkingSet

public void setWorkingSet(org.eclipse.ui.IWorkingSet newWorkingSet)
Deprecated. individual views should store a working set if needed

Sets the active working set for the workbench page. Notifies property change listener about the change.

Since:
2.0

showActionSet

public void showActionSet(java.lang.String actionSetID)
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Shows an action set in this page.

In most cases where this method is used the caller is tightly coupled to a particular action set. They define it in the registry and may make it visible in certain scenarios by calling showActionSet. A static variable is often used to identify the action set id in caller code.

Specified by:
showActionSet in interface org.eclipse.ui.IWorkbenchPage

showView

public org.eclipse.ui.IViewPart showView(java.lang.String viewID)
                                  throws org.eclipse.ui.PartInitException
See IWorkbenchPage.

Specified by:
showView in interface org.eclipse.ui.IWorkbenchPage

showView

public org.eclipse.ui.IViewPart showView(java.lang.String viewID,
                                         java.lang.String secondaryID,
                                         int mode)
                                  throws org.eclipse.ui.PartInitException
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Shows a view in this page with the given id and secondary id. The behaviour of this method varies based on the supplied mode. If VIEW_ACTIVATE is supplied, the view is focus. If VIEW_VISIBLE is supplied, then it is made visible but not given focus. Finally, if VIEW_CREATE is supplied the view is created and will only be made visible if it is not created in a folder that already contains visible views.

This allows multiple instances of a particular view to be created. They are disambiguated using the secondary id. If a secondary id is given, the view must allow multiple instances by having specified allowMultiple="true" in its extension.

Specified by:
showView in interface org.eclipse.ui.IWorkbenchPage

certifyMode

private boolean certifyMode(int mode)
Since:
3.0

hideFastView

public void hideFastView()
Hides the active fast view. Has no effect if there is no fast view active.


toggleFastView

public void toggleFastView(org.eclipse.ui.IViewReference ref)
Toggles the visibility of a fast view. If the view is active it is deactivated. Otherwise, it is activated.


toggleZoom

public void toggleZoom(org.eclipse.ui.IWorkbenchPartReference ref)
Zoom in on a part. If the part is already in zoom then zoom out.


updateActionBars

public void updateActionBars()
updateActionBars method comment.


updateTabList

private void updateTabList(org.eclipse.ui.IWorkbenchPart part)
Sets the tab list of this page's composite appropriately when a part is activated.


updateTitle

public void updateTitle(org.eclipse.ui.IViewReference ref)
The title of the given part has changed. For views, updates the fast view button if necessary.


zoomOut

void zoomOut()
Zooms out a zoomed in part.


zoomOutIfNecessary

private void zoomOutIfNecessary(org.eclipse.ui.IWorkbenchPart part)
Zooms out a zoomed in part if it is necessary to do so for the user to view the IWorkbenchPart that is the argument. Otherwise, does nothing.


getEditorReuseThreshold

public int getEditorReuseThreshold()
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Returns the number of open editors before reusing editors.

Specified by:
getEditorReuseThreshold in interface org.eclipse.ui.IWorkbenchPage

setEditorReuseThreshold

public void setEditorReuseThreshold(int openEditors)
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Set the number of open editors before reusing editors. If < 0 the user preference settings will be used. Note: For EXPERIMENTAL use only. IT MAY CHANGE IN NEAR FUTURE.

Specified by:
setEditorReuseThreshold in interface org.eclipse.ui.IWorkbenchPage

getSortedEditors

public org.eclipse.ui.IEditorReference[] getSortedEditors()

getOpenedPerspectives

protected org.eclipse.ui.IPerspectiveDescriptor[] getOpenedPerspectives()
Returns an iterator over the opened perspectives


getSortedPerspectives

protected org.eclipse.ui.IPerspectiveDescriptor[] getSortedPerspectives()

getSortedParts

public org.eclipse.ui.IWorkbenchPartReference[] getSortedParts()

getReference

public org.eclipse.ui.IWorkbenchPartReference getReference(org.eclipse.ui.IWorkbenchPart part)

getStateMap

protected java.util.HashMap getStateMap()

addPerspective

protected void addPerspective(Perspective persp)

getViewReferenceStack

private org.eclipse.ui.IViewReference[] getViewReferenceStack(org.eclipse.ui.IViewPart part)
Find the stack of view references stacked with this view part.

Since:
3.0

getViewStack

public org.eclipse.ui.IViewPart[] getViewStack(org.eclipse.ui.IViewPart part)
Description copied from interface: org.eclipse.ui.IWorkbenchPage
Returns an array of IViewParts that are stacked with the given part. EXPERIMENTAL

Specified by:
getViewStack in interface org.eclipse.ui.IWorkbenchPage

resizeView

public void resizeView(org.eclipse.ui.IViewPart part,
                       int width,
                       int height)
Allow for programmatically resizing a part.

EXPERIMENTAL

Known limitations:

  • currently applies only to views
  • has no effect when view is zoomed


findSashParts

private void findSashParts(LayoutTree tree,
                           PartPane.Sashes sashes,
                           WorkbenchPage.SashInfo info)