|
| berryObjectMacro (berry::IWorkbenchPage) |
|
| ~IWorkbenchPage () override |
|
virtual void | Activate (IWorkbenchPart::Pointer part)=0 |
|
virtual void | BringToTop (IWorkbenchPart::Pointer part)=0 |
|
virtual bool | Close ()=0 |
|
virtual bool | CloseAllEditors (bool save)=0 |
|
virtual bool | CloseEditors (const QList< IEditorReference::Pointer > &editorRefs, bool save)=0 |
|
virtual bool | CloseEditor (IEditorPart::Pointer editor, bool save)=0 |
|
virtual IViewPart::Pointer | FindView (const QString &viewId)=0 |
|
virtual IViewReference::Pointer | FindViewReference (const QString &viewId)=0 |
|
virtual IViewReference::Pointer | FindViewReference (const QString &viewId, const QString &secondaryId)=0 |
|
virtual IEditorPart::Pointer | GetActiveEditor ()=0 |
|
virtual IEditorPart::Pointer | FindEditor (IEditorInput::Pointer input)=0 |
|
virtual QList< IEditorReference::Pointer > | FindEditors (IEditorInput::Pointer input, const QString &editorId, int matchFlags)=0 |
|
virtual QList< IEditorPart::Pointer > | GetEditors ()=0 |
|
virtual QList< IEditorReference::Pointer > | GetEditorReferences ()=0 |
|
virtual QList< IEditorPart::Pointer > | GetDirtyEditors ()=0 |
|
virtual IAdaptable * | GetInput ()=0 |
|
virtual QString | GetLabel ()=0 |
|
virtual IPerspectiveDescriptor::Pointer | GetPerspective ()=0 |
|
virtual QList< IViewReference::Pointer > | GetViewReferences ()=0 |
|
virtual QList< IViewPart::Pointer > | GetViews ()=0 |
|
virtual IWorkbenchWindow::Pointer | GetWorkbenchWindow () const =0 |
|
virtual void | HideView (IViewPart::Pointer view)=0 |
|
virtual void | HideView (IViewReference::Pointer view)=0 |
|
virtual bool | IsPartVisible (IWorkbenchPart::Pointer part)=0 |
|
virtual void | ReuseEditor (IReusableEditor::Pointer editor, IEditorInput::Pointer input)=0 |
|
virtual IEditorPart::Pointer | OpenEditor (IEditorInput::Pointer input, const QString &editorId)=0 |
|
virtual IEditorPart::Pointer | OpenEditor (IEditorInput::Pointer input, const QString &editorId, bool activate)=0 |
|
virtual IEditorPart::Pointer | OpenEditor (IEditorInput::Pointer input, const QString &editorId, bool activate, int matchFlags)=0 |
|
virtual void | ResetPerspective ()=0 |
|
virtual bool | SaveAllEditors (bool confirm)=0 |
|
virtual bool | SaveEditor (IEditorPart::Pointer editor, bool confirm)=0 |
|
virtual void | SavePerspective ()=0 |
|
virtual void | SavePerspectiveAs (IPerspectiveDescriptor::Pointer perspective)=0 |
|
virtual void | SetPerspective (IPerspectiveDescriptor::Pointer perspective)=0 |
|
virtual IViewPart::Pointer | ShowView (const QString &viewId)=0 |
|
virtual IViewPart::Pointer | ShowView (const QString &viewId, const QString &secondaryId, int mode)=0 |
|
virtual bool | IsEditorPinned (IEditorPart::Pointer editor)=0 |
|
virtual QList< QString > | GetPerspectiveShortcuts ()=0 |
|
virtual QList< QString > | GetShowViewShortcuts ()=0 |
|
virtual QList< IPerspectiveDescriptor::Pointer > | GetOpenPerspectives ()=0 |
|
virtual QList< IPerspectiveDescriptor::Pointer > | GetSortedPerspectives ()=0 |
|
virtual void | ClosePerspective (IPerspectiveDescriptor::Pointer desc, bool saveParts, bool closePage)=0 |
|
virtual void | CloseAllPerspectives (bool saveEditors, bool closePage)=0 |
|
virtual IExtensionTracker * | GetExtensionTracker () const =0 |
|
virtual IWorkbenchPartReference::Pointer | GetReference (IWorkbenchPart::Pointer part)=0 |
|
virtual | ~IPartService () |
|
virtual void | AddPartListener (IPartListener *listener)=0 |
|
virtual IWorkbenchPart::Pointer | GetActivePart ()=0 |
|
virtual IWorkbenchPartReference::Pointer | GetActivePartReference ()=0 |
|
virtual void | RemovePartListener (IPartListener *listener)=0 |
|
virtual | ~ISelectionService () |
|
virtual void | AddSelectionListener (ISelectionListener *listener)=0 |
|
virtual void | AddSelectionListener (const QString &partId, ISelectionListener *listener)=0 |
|
virtual void | AddPostSelectionListener (ISelectionListener *listener)=0 |
|
virtual void | AddPostSelectionListener (const QString &partId, ISelectionListener *listener)=0 |
|
virtual ISelection::ConstPointer | GetSelection () const =0 |
|
virtual ISelection::ConstPointer | GetSelection (const QString &partId)=0 |
|
virtual void | RemoveSelectionListener (ISelectionListener *listener)=0 |
|
virtual void | RemoveSelectionListener (const QString &partId, ISelectionListener *listener)=0 |
|
virtual void | RemovePostSelectionListener (ISelectionListener *listener)=0 |
|
virtual void | RemovePostSelectionListener (const QString &partId, ISelectionListener *listener)=0 |
|
virtual QString | GetClassName () const |
|
virtual Reflection::TypeInfo | GetTypeInfo () const |
|
virtual QList< Reflection::TypeInfo > | GetSuperclasses () const |
|
virtual void | Delete () |
|
QDebug | Print (QDebug os, Indent Indent=0) const |
|
virtual QString | ToString () const |
|
virtual uint | HashCode () const |
|
virtual bool | operator< (const Object *) const |
|
void | Register () const |
|
void | UnRegister (bool del=true) const |
|
int | GetReferenceCount () const |
|
void | SetReferenceCount (int) |
|
void | AddDestroyListener (const MessageAbstractDelegate<> &delegate) const |
|
void | RemoveDestroyListener (const MessageAbstractDelegate<> &delegate) const |
|
virtual bool | operator== (const Object *) const |
|
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
-
IEditorPart
-
IViewPart
Definition at line 65 of file berryIWorkbenchPage.h.
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 |
editorId | the id of the editor extension to use |
- Returns
- an open and active editor, or
null
if an external editor was opened
- Exceptions
-
PartInitException | if the editor could not be created or initialized |
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 |
editorId | the id of the editor extension to use |
activate | if true the editor will be activated |
- Returns
- an open editor, or
null
if an external editor was opened
- Exceptions
-
PartInitException | if the editor could not be created or initialized |
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 |
editorId | the id of the editor extension to use |
activate | if true the editor will be activated |
matchFlags | a bit mask consisting of zero or more of the MATCH_* constants OR-ed together |
- Returns
- an open editor, or
null
if an external editor was opened
- Exceptions
-
PartInitException | if the editor could not be created or initialized |
- See also
- MATCH_NONE
-
MATCH_INPUT
-
MATCH_ID
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 |
virtual IViewPart::Pointer berry::IWorkbenchPage::ShowView |
( |
const QString & |
viewId, |
|
|
const QString & |
secondaryId, |
|
|
int |
mode |
|
) |
| |
|
pure virtual |
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 |
secondaryId | the secondary id to use, or null for no secondary id |
mode | the activation mode. Must be VIEW_ACTIVATE, VIEW_VISIBLE or VIEW_CREATE |
- Returns
- a view
- Exceptions
-
PartInitException | if the view could not be initialized |
IllegalArgumentException | if the supplied mode is not valid |