| org.eclipse.ui.IWorkbenchPage
All known Subclasses: org.eclipse.ui.internal.WorkbenchPage,
IWorkbenchPage | public interface IWorkbenchPage extends IPartService,ISelectionService,ICompatibleWorkbenchPage(Code) | | A workbench page consists of an arrangement of views and editors intended to
be presented together to the user in a single workbench window.
A page can contain 0 or more views and 0 or more editors. These views and
editors are contained wholly within the page and are not shared with other
pages. The layout and visible action set for the page is defined by a
perspective.
The number of views and editors within a page is restricted to simplify part
management for the user. In particular:
- Unless a view explicitly allows for multiple instances in its plugin
declaration there will be only one instance in a given workbench page.
- Only one editor can exist for each editor input within a page.
-
This interface is not intended to be implemented by clients.
See Also: IPerspectiveDescriptor See Also: IEditorPart See Also: IViewPart |
Field Summary | |
final public static String | CHANGE_ACTION_SET_HIDE Change event id when an action set is hidden in a perspective. | final public static String | CHANGE_ACTION_SET_SHOW Change event id when an action set is shown in a perspective. | final public static String | CHANGE_EDITOR_AREA_HIDE Change event id when the editor area is hidden in a perspective. | final public static String | CHANGE_EDITOR_AREA_SHOW Change event id when the editor area is shown in a perspective. | final public static String | CHANGE_EDITOR_CLOSE Change event id when one or more editors are closed in a perspective. | final public static String | CHANGE_EDITOR_OPEN Change event id when one or more editors are opened in a perspective. | final public static String | CHANGE_FAST_VIEW_ADD Change event id when a fast view is added in a perspective. | final public static String | CHANGE_FAST_VIEW_REMOVE Change event id when a fast view is removed in a perspective. | final public static String | CHANGE_RESET Change event id when the perspective is reset to its original state. | final public static String | CHANGE_RESET_COMPLETE Change event id when the perspective has completed a reset to its
original state. | final public static String | CHANGE_VIEW_HIDE Change event id when one or more views are hidden in a perspective. | final public static String | CHANGE_VIEW_SHOW Change event id when one or more views are shown in a perspective. | final public static String | CHANGE_WORKING_SETS_REPLACE | final public static String | CHANGE_WORKING_SET_REPLACE | final public static String | EDITOR_ID_ATTR An optional attribute within a workspace marker (IMarker )
which identifies the preferred editor type to be opened when
openEditor is called. | final public static int | MATCH_ID Editor opening match mode specifying that the editor id should be
considered when matching against existing editors. | final public static int | MATCH_INPUT Editor opening match mode specifying that the editor input should be
considered when matching against existing editors. | final public static int | MATCH_NONE Editor opening match mode specifying that no matching against existing
editors should be done. | final public static int | STATE_MAXIMIZED State of a view in a given page when the page is zoomed in on the view
stack. | final public static int | STATE_MINIMIZED State of a view in a given page when the view stack is minimized. | final public static int | STATE_RESTORED State of a view in a given page when the view stack is in it's normal
state. | final public static int | VIEW_ACTIVATE Show view mode that indicates the view should be made visible and
activated. | final public static int | VIEW_CREATE Show view mode that indicates the view should be made created but not
necessarily be made visible. | final public static int | VIEW_VISIBLE Show view mode that indicates the view should be made visible. |
Method Summary | |
public void | activate(IWorkbenchPart part) Activates the given part. | public void | addPropertyChangeListener(IPropertyChangeListener listener) Adds a property change listener. | public void | bringToTop(IWorkbenchPart part) Moves the given part forward in the Z order of this page so as to make it
visible, without changing which part has focus. | public boolean | close() Closes this workbench page. | public boolean | closeAllEditors(boolean save) Closes all of the editors belonging to this workbench page. | public void | closeAllPerspectives(boolean saveEditors, boolean closePage) Closes all perspectives in this page. | public boolean | closeEditor(IEditorPart editor, boolean save) Closes the given editor. | public boolean | closeEditors(IEditorReference[] editorRefs, boolean save) Closes the given Array of editor references. | public void | closePerspective(IPerspectiveDescriptor desc, boolean saveParts, boolean closePage) Closes the specified perspective in this page. | public IEditorPart | findEditor(IEditorInput input) Returns the editor with the specified input. | public IEditorReference[] | findEditors(IEditorInput input, String editorId, int matchFlags) Returns an array of editor references that match the given input and/or
editor id, as specified by the given match flags. | public IViewPart | findView(String viewId) Returns the view in this page with the specified id. | public IViewReference | findViewReference(String viewId) Returns the view reference with the specified id. | public IViewReference | findViewReference(String viewId, String secondaryId) Returns the view reference with the specified id and secondary id. | public IEditorPart | getActiveEditor() Returns the active editor open in this page. | public IWorkingSet | getAggregateWorkingSet() Return a working set that contains all of the elements contained in the
array of working sets provided by
IWorkbenchPage.getWorkingSets() . | public IEditorPart[] | getDirtyEditors() Returns a list of dirty editors in this page. | public IEditorReference[] | getEditorReferences() Returns an array of references to open editors in this page. | public int | getEditorReuseThreshold() Returns the number of open editors before reusing editors. | public IEditorPart[] | getEditors() Returns a list of the editors open in this page. | public IExtensionTracker | getExtensionTracker()
Return the extension tracker for the workbench. | public IAdaptable | getInput() Returns the input for this page. | public String | getLabel() Returns the page label. | public 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. | public String[] | getNewWizardShortcuts() Returns the new wizard shortcuts associated with the current perspective. | public IPerspectiveDescriptor[] | getOpenPerspectives() Returns the descriptors for the perspectives that are open in this page,
in the order in which they were opened. | public int | getPartState(IWorkbenchPartReference ref) Returns the maximized/minimized/restored state of the given part
reference.
Parameters: ref - the workbench part to query. | public IPerspectiveDescriptor | getPerspective() Returns the current perspective descriptor for this page, or
null if there is no current perspective. | public String[] | getPerspectiveShortcuts() Returns the perspective shortcuts associated with the current
perspective. | public IWorkbenchPartReference | getReference(IWorkbenchPart part) Find the part reference for the given part. | public String[] | getShowViewShortcuts() Returns the show view shortcuts associated with the current perspective. | public IPerspectiveDescriptor[] | getSortedPerspectives() Returns the descriptors for the perspectives that are open in this page,
in the order in which they were activated (oldest first). | public IViewReference[] | getViewReferences() Returns a list of the reference to views visible on this page. | IViewPart[] | getViewStack(IViewPart part) Returns an array of IViewParts that are stacked with the given part.
Parameters: part - the part to test the parts that are stacked with this part, including the part inquestion. | public IViewPart[] | getViews() Returns a list of the views visible on this page. | public IWorkbenchWindow | getWorkbenchWindow() Returns the workbench window of this page. | public IWorkingSet | getWorkingSet() Returns the working set of this page. | public IWorkingSet[] | getWorkingSets() Return the visible working sets for this page. | public void | hideActionSet(String actionSetID) 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. | public void | hideView(IViewPart view) Hides the given view. | public void | hideView(IViewReference view) Hides the given view that belongs to the reference, if any. | public boolean | isEditorAreaVisible() Returns whether the page's current perspective is showing the editor
area. | public boolean | isEditorPinned(IEditorPart editor) Returns true if the editor is pinned and should not be
reused. | public boolean | isPageZoomed() Returns the page "zoomed" state. | public boolean | isPartVisible(IWorkbenchPart part) Returns whether the specified part is visible. | public IEditorPart | openEditor(IEditorInput input, String editorId) Opens an editor on the given input.
If this page already has an editor open on the target input that editor
is activated; otherwise, a new editor is opened. | public IEditorPart | openEditor(IEditorInput input, String editorId, boolean activate) Opens an editor on the given input.
If this page already has an editor open on the target input that editor
is brought to the front; otherwise, a new editor is opened. | public IEditorPart | openEditor(IEditorInput input, String editorId, boolean activate, int matchFlags) Opens an editor on the given input.
If this page already has an editor open that matches the given input
and/or editor id (as specified by the matchFlags argument), that editor
is brought to the front; otherwise, a new editor is opened. | public void | removePropertyChangeListener(IPropertyChangeListener listener) Removes the property change listener. | public void | resetPerspective() Changes the visible views, their layout, and the visible action sets
within the page to match the current perspective descriptor. | public void | reuseEditor(IReusableEditor editor, IEditorInput input) Reuses the specified editor by setting its new input. | public boolean | saveAllEditors(boolean confirm) Saves the contents of all dirty editors belonging to this workbench page. | public boolean | saveEditor(IEditorPart editor, boolean confirm) Saves the contents of the given editor if dirty. | public void | savePerspective() Saves the visible views, their layout, and the visible action sets for
this page to the current perspective descriptor. | public void | savePerspectiveAs(IPerspectiveDescriptor perspective) Saves the visible views, their layout, and the visible action sets for
this page to the given perspective descriptor. | public void | setEditorAreaVisible(boolean showEditorArea) Show or hide the editor area for the page's active perspective. | public void | setEditorReuseThreshold(int openEditors) Set the number of open editors before reusing editors. | public void | setPartState(IWorkbenchPartReference ref, int state) Set the state of the given part reference. | public void | setPerspective(IPerspectiveDescriptor perspective) Changes the visible views, their layout, and the visible action sets
within the page to match the given perspective descriptor. | public void | setWorkingSets(IWorkingSet[] sets) Set the working sets for this page. | public void | showActionSet(String actionSetID) 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. | public IViewPart | showView(String viewId) Shows the view identified by the given view id in this page and gives it
focus. | public IViewPart | showView(String viewId, String secondaryId, int mode) Shows a view in this page with the given id and secondary id. | public void | toggleZoom(IWorkbenchPartReference ref) Zoom the page in on a part. | public void | zoomOut() Zooms out the zoomed-in part. |
CHANGE_ACTION_SET_HIDE | final public static String CHANGE_ACTION_SET_HIDE(Code) | | Change event id when an action set is hidden in a perspective.
See Also: IPerspectiveListener |
CHANGE_ACTION_SET_SHOW | final public static String CHANGE_ACTION_SET_SHOW(Code) | | Change event id when an action set is shown in a perspective.
See Also: IPerspectiveListener |
CHANGE_EDITOR_AREA_HIDE | final public static String CHANGE_EDITOR_AREA_HIDE(Code) | | Change event id when the editor area is hidden in a perspective.
See Also: IPerspectiveListener |
CHANGE_EDITOR_AREA_SHOW | final public static String CHANGE_EDITOR_AREA_SHOW(Code) | | Change event id when the editor area is shown in a perspective.
See Also: IPerspectiveListener |
CHANGE_EDITOR_CLOSE | final public static String CHANGE_EDITOR_CLOSE(Code) | | Change event id when one or more editors are closed in a perspective.
See Also: IPerspectiveListener |
CHANGE_EDITOR_OPEN | final public static String CHANGE_EDITOR_OPEN(Code) | | Change event id when one or more editors are opened in a perspective.
See Also: IPerspectiveListener |
CHANGE_FAST_VIEW_ADD | final public static String CHANGE_FAST_VIEW_ADD(Code) | | Change event id when a fast view is added in a perspective.
See Also: IPerspectiveListener |
CHANGE_FAST_VIEW_REMOVE | final public static String CHANGE_FAST_VIEW_REMOVE(Code) | | Change event id when a fast view is removed in a perspective.
See Also: IPerspectiveListener |
CHANGE_RESET_COMPLETE | final public static String CHANGE_RESET_COMPLETE(Code) | | Change event id when the perspective has completed a reset to its
original state.
since: 3.0 See Also: IPerspectiveListener |
CHANGE_VIEW_HIDE | final public static String CHANGE_VIEW_HIDE(Code) | | Change event id when one or more views are hidden in a perspective.
See Also: IPerspectiveListener |
CHANGE_VIEW_SHOW | final public static String CHANGE_VIEW_SHOW(Code) | | Change event id when one or more views are shown in a perspective.
See Also: IPerspectiveListener |
CHANGE_WORKING_SETS_REPLACE | final public static String CHANGE_WORKING_SETS_REPLACE(Code) | | Change event id when the page working set list was replaced
See Also: IPropertyChangeListener since: 3.2 |
CHANGE_WORKING_SET_REPLACE | final public static String CHANGE_WORKING_SET_REPLACE(Code) | | Change event id when the page working set was replaced
See Also: IPropertyChangeListener |
MATCH_ID | final public static int MATCH_ID(Code) | | Editor opening match mode specifying that the editor id should be
considered when matching against existing editors.
since: 3.2 |
MATCH_INPUT | final public static int MATCH_INPUT(Code) | | Editor opening match mode specifying that the editor input should be
considered when matching against existing editors.
since: 3.2 |
MATCH_NONE | final public static int MATCH_NONE(Code) | | Editor opening match mode specifying that no matching against existing
editors should be done.
since: 3.2 |
STATE_MAXIMIZED | final public static int STATE_MAXIMIZED(Code) | | State of a view in a given page when the page is zoomed in on the view
stack.
since: 3.2 |
STATE_MINIMIZED | final public static int STATE_MINIMIZED(Code) | | State of a view in a given page when the view stack is minimized.
since: 3.2 |
STATE_RESTORED | final public static int STATE_RESTORED(Code) | | State of a view in a given page when the view stack is in it's normal
state.
since: 3.2 |
VIEW_ACTIVATE | final public static int VIEW_ACTIVATE(Code) | | Show view mode that indicates the view should be made visible and
activated. Use of this mode has the same effect as calling
IWorkbenchPage.showView(String) .
since: 3.0 |
VIEW_CREATE | final public static int VIEW_CREATE(Code) | | Show view mode that indicates the view should be made created but not
necessarily be made visible. It will only be made visible in the event
that it is opened in its own container. In other words, only if it is not
stacked with another view.
since: 3.0 |
VIEW_VISIBLE | final public static int VIEW_VISIBLE(Code) | | Show view mode that indicates the view should be made visible. If the
view is opened in the container that contains the active view then this
has the same effect as VIEW_CREATE .
since: 3.0 |
activate | public void activate(IWorkbenchPart part)(Code) | | Activates the given part. The part will be brought to the front and given
focus. The part must belong to this page.
Parameters: part - the part to activate |
addPropertyChangeListener | public void addPropertyChangeListener(IPropertyChangeListener listener)(Code) | | Adds a property change listener.
Parameters: listener - the property change listener to add since: 2.0 |
bringToTop | public void bringToTop(IWorkbenchPart part)(Code) | | Moves the given part forward in the Z order of this page so as to make it
visible, without changing which part has focus. The part must belong to
this page.
Parameters: part - the part to bring forward |
close | public boolean close()(Code) | | Closes this workbench page. If this page is the active one, this honor is
passed along to one of the window's other pages if possible.
If the page has an open editor with unsaved content, the user will be
given the opportunity to save it.
true if the page was successfully closed, andfalse if it is still open |
closeAllEditors | public boolean closeAllEditors(boolean save)(Code) | | Closes all of the editors belonging to this workbench page.
If the page has open editors with unsaved content and save
is true , the user will be given the opportunity to save
them.
Parameters: save - true if all editors were successfully closed, andfalse if at least one is still open |
closeAllPerspectives | public void closeAllPerspectives(boolean saveEditors, boolean closePage)(Code) | | Closes all perspectives in this page. All editors are closed, prompting
to save any unsaved changes if saveEditors is
true . The page itself is closed if closePage
is true .
Parameters: saveEditors - whether the page's editors should be saved Parameters: closePage - whether the page itself should be closed since: 3.1 |
closeEditor | public boolean closeEditor(IEditorPart editor, boolean save)(Code) | | Closes the given editor. The editor must belong to this workbench page.
If the editor has unsaved content and save is
true , the user will be given the opportunity to save it.
Parameters: editor - the editor to close Parameters: save - true to save the editor contents if required(recommended), and false to discard any unsavedchanges true if the editor was successfully closed, andfalse if the editor is still open |
closeEditors | public boolean closeEditors(IEditorReference[] editorRefs, boolean save)(Code) | | Closes the given Array of editor references. The editors
must belong to this workbench page.
If any of the editors have unsaved content and save is
true , the user will be given the opportunity to save
them.
Parameters: editorRefs - the editors to close Parameters: save - true to save the editor contents if required(recommended), and false to discard any unsavedchanges true if the editors were successfully closed, andfalse if the editors are still open since: 3.0 |
closePerspective | public void closePerspective(IPerspectiveDescriptor desc, boolean saveParts, boolean closePage)(Code) | | Closes the specified perspective in this page. If the last perspective in
this page is closed, then all editors are closed. Views that are not
shown in other perspectives are closed as well. If saveParts
is true , the user will be prompted to save any unsaved
changes for parts that are being closed. The page itself is closed if
closePage is true .
Parameters: desc - the descriptor of the perspective to be closed Parameters: saveParts - whether the page's parts should be saved if closed Parameters: closePage - whether the page itself should be closed if last perspective since: 3.1 |
findEditor | public IEditorPart findEditor(IEditorInput input)(Code) | | Returns the editor with the specified input. Returns null if there is no
opened editor with that input.
Parameters: input - the editor input an editor with input equals to input |
findEditors | public IEditorReference[] findEditors(IEditorInput input, String editorId, int matchFlags)(Code) | | Returns an array of editor references that match the given input and/or
editor id, as specified by the given match flags. Returns an empty array
if there are no matching editors, or if matchFlags is MATCH_NONE.
Parameters: input - the editor input, or null if MATCH_INPUT is notspecified in matchFlags Parameters: editorId - the editor id, or null if MATCH_ID is notspecified in matchFlags Parameters: matchFlags - a bit mask consisting of zero or more of the MATCH_* constantsOR-ed together the references for the matching editors See Also: IWorkbenchPage.MATCH_NONE See Also: IWorkbenchPage.MATCH_INPUT See Also: IWorkbenchPage.MATCH_ID since: 3.2 |
findView | public IViewPart findView(String viewId)(Code) | | Returns the view in this page with the specified id. There is at most one
view in the page with the specified id.
Parameters: viewId - the id of the view extension to use the view, or null if none is found |
findViewReference | public IViewReference findViewReference(String viewId)(Code) | | Returns the view reference with the specified id.
Parameters: viewId - the id of the view extension to use the view reference, or null if none is found since: 3.0 |
findViewReference | public IViewReference findViewReference(String viewId, String secondaryId)(Code) | | Returns the view reference with the specified id and secondary id.
Parameters: viewId - the id of the view extension to use Parameters: secondaryId - the secondary id to use, or null for nosecondary id the view reference, or null if none is found since: 3.0 |
getActiveEditor | public IEditorPart getActiveEditor()(Code) | | 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.
the active editor, or null if no editor is active |
getAggregateWorkingSet | public IWorkingSet getAggregateWorkingSet()(Code) | | Return a working set that contains all of the elements contained in the
array of working sets provided by
IWorkbenchPage.getWorkingSets() . Should this
array or the underlying elements in any of the working sets change this
set will be updated.
This working set is never null , even if there are no
working sets assigned to this page via
IWorkbenchPage.setWorkingSets(IWorkingSet[]) . It is recommended that any
client that uses this API be aware of this and act accordingly.
Specifically, it is recommended that any client utilizing this or any
other IWorkingSet whose
IWorkingSet.isAggregateWorkingSet returns true act as if they are not using any working set
if the set is empty. These clients should also maintain an awareness of
the contents of aggregate working sets and toggle this behavior should
the contents of the aggregate either become empty or non-empty.
Example: Here we have pseudocode showing how some workingset
utilizing component could react to changes in aggregate working sets.
private IWorkingSet myWorkingSet;
IPropertyChangeListener workingSetListener = new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
if (isMyCurrentWorkingSet(event)) {
if (isEmptyAggregate(myWorkingSet)) {
showNoSet();
}
else {
showSet();
}
}
}
};
public void setWorkingSet(IWorkingSet newSet) {
myWorkingSet = newSet;
if (myWorkingSet == null || isEmptyAggregate(myWorkingSet)){
showNoSet();
}
else {
showSet();
}
}
the aggregate working set for this page since: 3.2 |
getDirtyEditors | public IEditorPart[] getDirtyEditors()(Code) | | Returns a list of dirty editors in this page.
a list of dirty editors |
getEditorReferences | public IEditorReference[] getEditorReferences()(Code) | | Returns an array of references to open editors in this page.
Note that each page has its own editors; editors are never shared between
pages.
a list of open editors |
getEditorReuseThreshold | public int getEditorReuseThreshold()(Code) | | Returns the number of open editors before reusing editors.
a int |
getEditors | public IEditorPart[] getEditors()(Code) | | Returns a list of the editors open in this page.
Note that each page has its own editors; editors are never shared between
pages.
a list of open editors |
getExtensionTracker | public IExtensionTracker getExtensionTracker()(Code) | |
Return the extension tracker for the workbench. This tracker may be used
by plug-ins to ensure responsiveness to changes to the plug-in registry.
The tracker at this level of the workbench is typically used to track
elements that only exist over the lifespan of a page. For example,
ViewPart objects fall into this category.
the extension tracker See Also: IWorkbench.getExtensionTracker See Also: IWorkbenchWindow.getExtensionTracker since: 3.1 |
getInput | public IAdaptable getInput()(Code) | | Returns the input for this page.
the input for this page, or null if none |
getLabel | public String getLabel()(Code) | | Returns the page label. This will be a unique identifier within the
containing workbench window.
the page label |
getNavigationHistory | public INavigationHistory getNavigationHistory()(Code) | | 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.
the navigation history since: 2.1 |
getNewWizardShortcuts | public String[] getNewWizardShortcuts()(Code) | | Returns the new wizard shortcuts associated with the current perspective.
Returns an empty array if there is no current perspective.
See Also: IPageLayout.addNewWizardShortcut(String) an array of wizard identifiers since: 3.1 |
getOpenPerspectives | public IPerspectiveDescriptor[] getOpenPerspectives()(Code) | | Returns the descriptors for the perspectives that are open in this page,
in the order in which they were opened.
the open perspective descriptors, in order of opening since: 3.1 |
getPartState | public int getPartState(IWorkbenchPartReference ref)(Code) | | Returns the maximized/minimized/restored state of the given part
reference.
Parameters: ref - the workbench part to query. Must not be null . one of the STATE_* contants. since: 3.2 |
getPerspectiveShortcuts | public String[] getPerspectiveShortcuts()(Code) | | Returns the perspective shortcuts associated with the current
perspective. Returns an empty array if there is no current perspective.
See Also: IPageLayout.addPerspectiveShortcut(String) an array of perspective identifiers since: 3.1 |
getReference | public IWorkbenchPartReference getReference(IWorkbenchPart part)(Code) | | Find the part reference for the given part. A convenience method to
quickly go from part to part reference.
Parameters: part - The part to search for. It can be null . The reference for the given part, or null if noreference can be found. since: 3.2 |
getShowViewShortcuts | public String[] getShowViewShortcuts()(Code) | | Returns the show view shortcuts associated with the current perspective.
Returns an empty array if there is no current perspective.
See Also: IPageLayout.addShowViewShortcut(String) an array of view identifiers since: 3.1 |
getSortedPerspectives | public IPerspectiveDescriptor[] getSortedPerspectives()(Code) | | Returns the descriptors for the perspectives that are open in this page,
in the order in which they were activated (oldest first).
the open perspective descriptors, in order of activation since: 3.1 |
getViewReferences | public IViewReference[] getViewReferences()(Code) | | Returns a list of the reference to views visible on this page.
Note that each page has its own views; views are never shared between
pages.
a list of references to visible views |
getViewStack | IViewPart[] getViewStack(IViewPart part)(Code) | | Returns an array of IViewParts that are stacked with the given part.
Parameters: part - the part to test the parts that are stacked with this part, including the part inquestion. null is returned if the part does notbelong to this page. since: 3.0 |
getViews | public IViewPart[] getViews()(Code) | | Returns a list of the views visible on this page.
Note that each page has its own views; views are never shared between
pages.
a list of visible views |
getWorkbenchWindow | public IWorkbenchWindow getWorkbenchWindow()(Code) | | Returns the workbench window of this page.
the workbench window |
getWorkingSet | public IWorkingSet getWorkingSet()(Code) | | Returns the working set of this page.
the working set of this page. since: 2.0 |
getWorkingSets | public IWorkingSet[] getWorkingSets()(Code) | | Return the visible working sets for this page. Please note that this
array is not filtered by activities. Clients should attempt to ensure
that any use of this method is consistant with the currently enabled
activity set.
the visible working sets for this page See Also: IWorkbench.getActivitySupport since: 3.2 |
hideActionSet | public void hideActionSet(String actionSetID)(Code) | | 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.
Parameters: actionSetID - the action set to hide |
hideView | public void hideView(IViewPart view)(Code) | | Hides the given view. The view must belong to this page.
Parameters: view - the view to hide |
hideView | public void hideView(IViewReference view)(Code) | | Hides the given view that belongs to the reference, if any.
Parameters: view - the references whos view is to be hidden since: 3.0 |
isEditorAreaVisible | public boolean isEditorAreaVisible()(Code) | | Returns whether the page's current perspective is showing the editor
area.
true when editor area visible, false otherwise |
isEditorPinned | public boolean isEditorPinned(IEditorPart editor)(Code) | | Returns true if the editor is pinned and should not be
reused.
Parameters: editor - the editor to test boolean whether the editor is pinned |
isPageZoomed | public boolean isPageZoomed()(Code) | | Returns the page "zoomed" state.
true if the page is zoomed in the workbenchwindow, false otherwise. since: 3.2 |
isPartVisible | public boolean isPartVisible(IWorkbenchPart part)(Code) | | Returns whether the specified part is visible.
Parameters: part - the part to test boolean true if part is visible |
openEditor | public IEditorPart openEditor(IEditorInput input, String editorId) throws PartInitException(Code) | | Opens an editor on the given input.
If this page already has an editor open on the target input that editor
is activated; otherwise, a new editor is opened. Two editor inputs,
input1 and input2, are considered the same if
input1.equals(input2) == true
.
The editor type is determined by mapping editorId to an
editor extension registered with the workbench. An editor id is passed
rather than an editor object to prevent the accidental creation of more
than one editor for the same input. It also guarantees a consistent
lifecycle for editors, regardless of whether they are created by the user
or restored from saved data.
Parameters: input - the editor input Parameters: editorId - the id of the editor extension to use an open and active editor, or null if an externaleditor was opened exception: PartInitException - if the editor could not be created or initialized |
openEditor | public IEditorPart openEditor(IEditorInput input, String editorId, boolean activate) throws PartInitException(Code) | | Opens an editor on the given input.
If this page already has an editor open on the target input that editor
is brought to the front; otherwise, a new editor is opened. Two editor
inputs are considered the same if they equal. See
Object.equals(Object)
and IEditorInput . If activate == true the editor
will be activated.
The editor type is determined by mapping editorId to an editor
extension registered with the workbench. An editor id is passed rather than
an editor object to prevent the accidental creation of more than one editor
for the same input. It also guarantees a consistent lifecycle for editors,
regardless of whether they are created by the user or restored from saved
data.
Parameters: input - the editor input Parameters: editorId - the id of the editor extension to use Parameters: activate - if true the editor will be activated an open editor, or null if an external editor was opened exception: PartInitException - if the editor could not be created or initialized |
openEditor | public IEditorPart openEditor(IEditorInput input, String editorId, boolean activate, int matchFlags) throws PartInitException(Code) | | Opens an editor on the given input.
If this page already has an editor open that matches the given input
and/or editor id (as specified by the matchFlags argument), that editor
is brought to the front; otherwise, a new editor is opened. Two editor
inputs are considered the same if they equal. See
Object.equals(Object)
and IEditorInput . If activate == true the editor
will be activated.
The editor type is determined by mapping editorId to an editor
extension registered with the workbench. An editor id is passed rather than
an editor object to prevent the accidental creation of more than one editor
for the same input. It also guarantees a consistent lifecycle for editors,
regardless of whether they are created by the user or restored from saved
data.
Parameters: input - the editor input Parameters: editorId - the id of the editor extension to use Parameters: activate - if true the editor will be activated Parameters: matchFlags - a bit mask consisting of zero or more of the MATCH_* constants OR-ed together an open editor, or null if an external editor was opened exception: PartInitException - if the editor could not be created or initialized See Also: IWorkbenchPage.MATCH_NONE See Also: IWorkbenchPage.MATCH_INPUT See Also: IWorkbenchPage.MATCH_ID since: 3.2 |
removePropertyChangeListener | public void removePropertyChangeListener(IPropertyChangeListener listener)(Code) | | Removes the property change listener.
Parameters: listener - the property change listener to remove since: 2.0 |
resetPerspective | public void resetPerspective()(Code) | | Changes the visible views, their layout, and the visible action sets
within the page to match the current perspective descriptor. This is a
rearrangement of components and not a replacement. The contents of the
current perspective descriptor are unaffected.
For more information on perspective change see
setPerspective() .
|
reuseEditor | public void reuseEditor(IReusableEditor editor, IEditorInput input)(Code) | | Reuses the specified editor by setting its new input.
Parameters: editor - the editor to be reused Parameters: input - the new input for the reusable editor |
saveAllEditors | public boolean saveAllEditors(boolean confirm)(Code) | | Saves the contents of all dirty editors belonging to this workbench page.
If there are no dirty editors this method returns without effect.
If confirm is true the user is prompted to
confirm the command.
Note that as of 3.2, this method also saves views that implement
ISaveablePart and are dirty.
Parameters: confirm - true to ask the user before saving unsavedchanges (recommended), and false to saveunsaved changes without asking true if the command succeeded, andfalse if the operation was canceled by the user oran error occurred while saving |
saveEditor | public boolean saveEditor(IEditorPart editor, boolean confirm)(Code) | | Saves the contents of the given editor if dirty. If not, this method
returns without effect.
If confirm is true the user is prompted to
confirm the command. Otherwise, the save happens without prompt.
The editor must belong to this workbench page.
Parameters: editor - the editor to close Parameters: confirm - true to ask the user before saving unsavedchanges (recommended), and false to saveunsaved changes without asking true if the command succeeded, andfalse if the editor was not saved |
savePerspective | public void savePerspective()(Code) | | Saves the visible views, their layout, and the visible action sets for
this page to the current perspective descriptor. The contents of the
current perspective descriptor are overwritten.
|
savePerspectiveAs | public void savePerspectiveAs(IPerspectiveDescriptor perspective)(Code) | | Saves the visible views, their layout, and the visible action sets for
this page to the given perspective descriptor. The contents of the given
perspective descriptor are overwritten and it is made the current one for
this page.
Parameters: perspective - the perspective descriptor to save to |
setEditorAreaVisible | public void setEditorAreaVisible(boolean showEditorArea)(Code) | | Show or hide the editor area for the page's active perspective.
Parameters: showEditorArea - true to show the editor area,false to hide the editor area |
setEditorReuseThreshold | public void setEditorReuseThreshold(int openEditors)(Code) | | Set the number of open editors before reusing editors. If < 0 the user
preference settings will be used.
Parameters: openEditors - the threshold |
setPartState | public void setPartState(IWorkbenchPartReference ref, int state)(Code) | | Set the state of the given part reference. Setting the state of one part
can effect the state of other parts.
Parameters: ref - the workbench part reference. Must not be null . Parameters: state - one of the STATE_* constants. since: 3.2 |
setPerspective | public void setPerspective(IPerspectiveDescriptor perspective)(Code) | | Changes the visible views, their layout, and the visible action sets
within the page to match the given perspective descriptor. This is a
rearrangement of components and not a replacement. The contents of the
old perspective descriptor are unaffected.
When a perspective change occurs the old perspective is deactivated
(hidden) and cached for future reference. Then the new perspective is
activated (shown). The views within the page are shared by all existing
perspectives to make it easy for the user to switch between one
perspective and another quickly without loss of context.
During activation the action sets are modified. If an action set is
specified in the new perspective which is not visible in the old one it
will be created. If an old action set is not specified in the new
perspective it will be disposed.
The visible views and their layout within the page also change. If a view
is specified in the new perspective which is not visible in the old one a
new instance of the view will be created. If an old view is not specified
in the new perspective it will be hidden. This view may reappear if the
user selects it from the View menu or if they switch to a perspective
(which may be the old one) where the view is visible.
The open editors are not modified by this method.
Parameters: perspective - the perspective descriptor |
setWorkingSets | public void setWorkingSets(IWorkingSet[] sets)(Code) | | Set the working sets for this page. Any duplicate entries will be removed
from the array by this method.
Parameters: sets - the new working sets for this page. The array may be empty,but no element in the array may be null . since: 3.2 |
showActionSet | public void showActionSet(String actionSetID)(Code) | | 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.
Parameters: actionSetID - the action set to show |
showView | public IViewPart showView(String viewId) throws PartInitException(Code) | | Shows the view identified by the given view id in this page and gives it
focus. If there is a view identified by the given view id (and with no
secondary id) already open in this page, it is given focus.
Parameters: viewId - the id of the view extension to use the shown view exception: PartInitException - if the view could not be initialized |
showView | public IViewPart showView(String viewId, String secondaryId, int mode) throws PartInitException(Code) | | 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.
Parameters: viewId - the id of the view extension to use Parameters: secondaryId - the secondary id to use, or null for nosecondary id Parameters: mode - the activation mode. Must be IWorkbenchPage.VIEW_ACTIVATE,IWorkbenchPage.VIEW_VISIBLE or IWorkbenchPage.VIEW_CREATE a view exception: PartInitException - if the view could not be initialized exception: IllegalArgumentException - if the supplied mode is not valid since: 3.0 |
toggleZoom | public void toggleZoom(IWorkbenchPartReference ref)(Code) | | Zoom the page in on a part. If the part is already in zoom then zoom out.
Parameters: ref - the workbench part to zoom in on. Must not benull . since: 3.2 |
zoomOut | public void zoomOut()(Code) | | Zooms out the zoomed-in part. If the page does not have a zoomed part, it
does nothing.
since: 3.2 |
|
|