Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berry::IWorkbenchPage Struct Referenceabstract

#include <berryIWorkbenchPage.h>

Inheritance diagram for berry::IWorkbenchPage:
Collaboration diagram for berry::IWorkbenchPage:

Public Member Functions

 berryObjectMacro (berry::IWorkbenchPage)~IWorkbenchPage()
 
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::PointerFindEditors (IEditorInput::Pointer input, const QString &editorId, int matchFlags)=0
 
virtual QList< IEditorPart::PointerGetEditors ()=0
 
virtual QList< IEditorReference::PointerGetEditorReferences ()=0
 
virtual QList< IEditorPart::PointerGetDirtyEditors ()=0
 
virtual IAdaptableGetInput ()=0
 
virtual QString GetLabel ()=0
 
virtual IPerspectiveDescriptor::Pointer GetPerspective ()=0
 
virtual QList< IViewReference::PointerGetViewReferences ()=0
 
virtual QList< IViewPart::PointerGetViews ()=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::PointerGetOpenPerspectives ()=0
 
virtual QList< IPerspectiveDescriptor::PointerGetSortedPerspectives ()=0
 
virtual void ClosePerspective (IPerspectiveDescriptor::Pointer desc, bool saveParts, bool closePage)=0
 
virtual void CloseAllPerspectives (bool saveEditors, bool closePage)=0
 
virtual IExtensionTrackerGetExtensionTracker () const =0
 
virtual IWorkbenchPartReference::Pointer GetReference (IWorkbenchPart::Pointer part)=0
 
- Public Member Functions inherited from berry::IPartService
virtual ~IPartService ()
 
virtual void AddPartListener (IPartListener *listener)=0
 
virtual IWorkbenchPart::Pointer GetActivePart ()=0
 
virtual IWorkbenchPartReference::Pointer GetActivePartReference ()=0
 
virtual void RemovePartListener (IPartListener *listener)=0
 
- Public Member Functions inherited from berry::ISelectionService
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
 
- Public Member Functions inherited from berry::Object
virtual QString GetClassName () const
 
virtual Reflection::TypeInfo GetTypeInfo () const
 
virtual QList< Reflection::TypeInfoGetSuperclasses () 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
 

Static Public Attributes

static const QString EDITOR_ID_ATTR
 
static const QString CHANGE_RESET
 
static const QString CHANGE_RESET_COMPLETE
 
static const QString CHANGE_VIEW_SHOW
 
static const QString CHANGE_VIEW_HIDE
 
static const QString CHANGE_EDITOR_OPEN
 
static const QString CHANGE_EDITOR_CLOSE
 
static const QString CHANGE_EDITOR_AREA_SHOW
 
static const QString CHANGE_EDITOR_AREA_HIDE
 
static const QString CHANGE_ACTION_SET_SHOW
 
static const QString CHANGE_ACTION_SET_HIDE
 
static const int VIEW_ACTIVATE
 
static const int VIEW_VISIBLE
 
static const int VIEW_CREATE
 
static const int MATCH_NONE
 
static const int MATCH_INPUT
 
static const int MATCH_ID
 

Additional Inherited Members

- Public Types inherited from berry::Object
typedef Object Self
 
typedef berry::SmartPointer< SelfPointer
 
typedef berry::SmartPointer< const SelfConstPointer
 
typedef berry::WeakPointer< SelfWeakPtr
 
typedef berry::WeakPointer< const SelfConstWeakPtr
 
- Static Public Member Functions inherited from berry::Object
static const char * GetStaticClassName ()
 
static Reflection::TypeInfo GetStaticTypeInfo ()
 
static QList< Reflection::TypeInfoGetStaticSuperclasses ()
 
- Protected Member Functions inherited from berry::Object
 Object ()
 
virtual ~Object ()
 
virtual QDebug PrintSelf (QDebug os, Indent indent) const
 
virtual QDebug PrintHeader (QDebug os, Indent indent) const
 
virtual QDebug PrintTrailer (QDebug os, Indent indent) const
 
- Protected Attributes inherited from berry::Object
QAtomicInt m_ReferenceCount
 
QMutex m_ReferenceCountLock
 

Detailed Description

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 69 of file berryIWorkbenchPage.h.

Member Function Documentation

virtual void berry::IWorkbenchPage::Activate ( IWorkbenchPart::Pointer  part)
pure virtual

Activates the given part. The part will be brought to the front and given focus. The part must belong to this page.

Parameters
partthe part to activate
berry::IWorkbenchPage::berryObjectMacro ( berry::IWorkbenchPage  )
virtual void berry::IWorkbenchPage::BringToTop ( IWorkbenchPart::Pointer  part)
pure virtual

Adds a property change listener.

Parameters
listenerthe property change listener to add 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.
partthe part to bring forward
virtual bool berry::IWorkbenchPage::Close ( )
pure virtual

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.

Returns
true if the page was successfully closed, and false if it is still open
virtual bool berry::IWorkbenchPage::CloseAllEditors ( bool  save)
pure virtual

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
Returns
true if all editors were successfully closed, and false if at least one is still open
virtual void berry::IWorkbenchPage::CloseAllPerspectives ( bool  saveEditors,
bool  closePage 
)
pure virtual

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
saveEditorswhether the page's editors should be saved
closePagewhether the page itself should be closed
virtual bool berry::IWorkbenchPage::CloseEditor ( IEditorPart::Pointer  editor,
bool  save 
)
pure virtual

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
editorthe editor to close
savetrue to save the editor contents if required (recommended), and false to discard any unsaved changes
Returns
true if the editor was successfully closed, and false if the editor is still open
virtual bool berry::IWorkbenchPage::CloseEditors ( const QList< IEditorReference::Pointer > &  editorRefs,
bool  save 
)
pure virtual

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
editorRefsthe editors to close
savetrue to save the editor contents if required (recommended), and false to discard any unsaved changes
Returns
true if the editors were successfully closed, and false if the editors are still open
virtual void berry::IWorkbenchPage::ClosePerspective ( IPerspectiveDescriptor::Pointer  desc,
bool  saveParts,
bool  closePage 
)
pure virtual

Closes current perspective. If last perspective, then entire page is closed.

Parameters
savePartswhether the page's parts should be saved if closed
closePagewhether the page itself should be closed if last perspective 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.
descthe descriptor of the perspective to be closed
savePartswhether the page's parts should be saved if closed
closePagewhether the page itself should be closed if last perspective
virtual IEditorPart::Pointer berry::IWorkbenchPage::FindEditor ( IEditorInput::Pointer  input)
pure virtual

Returns the editor with the specified input. Returns null if there is no opened editor with that input.

Parameters
inputthe editor input
Returns
an editor with input equals to input
virtual QList<IEditorReference::Pointer> berry::IWorkbenchPage::FindEditors ( IEditorInput::Pointer  input,
const QString &  editorId,
int  matchFlags 
)
pure virtual

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
inputthe editor input, or null if MATCH_INPUT is not specified in matchFlags
editorIdthe editor id, or null if MATCH_ID is not specified in matchFlags
matchFlagsa bit mask consisting of zero or more of the MATCH_* constants OR-ed together
Returns
the references for the matching editors
See also
MATCH_NONE
MATCH_INPUT
MATCH_ID
virtual IViewPart::Pointer berry::IWorkbenchPage::FindView ( const QString &  viewId)
pure virtual

Returns the view in this page with the specified id. There is at most one view in the page with the specified id.

Parameters
viewIdthe id of the view extension to use
Returns
the view, or null if none is found
virtual IViewReference::Pointer berry::IWorkbenchPage::FindViewReference ( const QString &  viewId)
pure virtual

Returns the view reference with the specified id.

Parameters
viewIdthe id of the view extension to use
Returns
the view reference, or null if none is found
virtual IViewReference::Pointer berry::IWorkbenchPage::FindViewReference ( const QString &  viewId,
const QString &  secondaryId 
)
pure virtual

Returns the view reference with the specified id and secondary id.

Parameters
viewIdthe id of the view extension to use
secondaryIdthe secondary id to use, or null for no secondary id
Returns
the view reference, or null if none is found
virtual IEditorPart::Pointer berry::IWorkbenchPage::GetActiveEditor ( )
pure virtual

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.

Returns
the active editor, or null if no editor is active
virtual QList<IEditorPart::Pointer> berry::IWorkbenchPage::GetDirtyEditors ( )
pure virtual

Returns a list of dirty editors in this page.

Returns
a list of dirty editors
virtual QList<IEditorReference::Pointer> berry::IWorkbenchPage::GetEditorReferences ( )
pure virtual

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.

Returns
a list of open editors
virtual QList<IEditorPart::Pointer> berry::IWorkbenchPage::GetEditors ( )
pure virtual

Returns a list of the editors open in this page.

Note that each page has its own editors; editors are never shared between pages.

Returns
a list of open editors
Deprecated:
use #getEditorReferences() instead
virtual IExtensionTracker* berry::IWorkbenchPage::GetExtensionTracker ( ) const
pure virtual

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.

Returns
the extension tracker
See also
IWorkbench::GetExtensionTracker()
IWorkbenchWindow::GetExtensionTracker()
virtual IAdaptable* berry::IWorkbenchPage::GetInput ( )
pure virtual

Returns the input for this page.

Returns
the input for this page, or null if none
virtual QString berry::IWorkbenchPage::GetLabel ( )
pure virtual

Returns the page label. This will be a unique identifier within the containing workbench window.

Returns
the page label
virtual QList<IPerspectiveDescriptor::Pointer> berry::IWorkbenchPage::GetOpenPerspectives ( )
pure virtual

Returns the descriptors for the perspectives that are open in this page, in the order in which they were opened.

Returns
the open perspective descriptors, in order of opening
virtual IPerspectiveDescriptor::Pointer berry::IWorkbenchPage::GetPerspective ( )
pure virtual

Returns the current perspective descriptor for this page, or null if there is no current perspective.

Returns
the current perspective descriptor or null
See also
#setPerspective
#savePerspective
virtual QList<QString> berry::IWorkbenchPage::GetPerspectiveShortcuts ( )
pure virtual

Returns the perspective shortcuts associated with the current perspective. Returns an empty array if there is no current perspective.

See also
IPageLayout::addPerspectiveShortcut(String)
Returns
an array of perspective identifiers
virtual IWorkbenchPartReference::Pointer berry::IWorkbenchPage::GetReference ( IWorkbenchPart::Pointer  part)
pure virtual

Find the part reference for the given part. A convenience method to quickly go from part to part reference.

Parameters
partThe part to search for. It can be null.
Returns
The reference for the given part, or null if no reference can be found.
virtual QList<QString> berry::IWorkbenchPage::GetShowViewShortcuts ( )
pure virtual

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)
Returns
an array of view identifiers
virtual QList<IPerspectiveDescriptor::Pointer> berry::IWorkbenchPage::GetSortedPerspectives ( )
pure virtual

Returns the descriptors for the perspectives that are open in this page, in the order in which they were activated (oldest first).

Returns
the open perspective descriptors, in order of activation
virtual QList<IViewReference::Pointer> berry::IWorkbenchPage::GetViewReferences ( )
pure virtual

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.

Returns
a list of references to visible views
virtual QList<IViewPart::Pointer> berry::IWorkbenchPage::GetViews ( )
pure virtual

Returns a list of the views visible on this page.

Note that each page has its own views; views are never shared between pages.

Returns
a list of visible views
Deprecated:
use #getViewReferences() instead.
virtual IWorkbenchWindow::Pointer berry::IWorkbenchPage::GetWorkbenchWindow ( ) const
pure virtual

Returns the workbench window of this page.

Returns
the workbench window
virtual void berry::IWorkbenchPage::HideView ( IViewPart::Pointer  view)
pure virtual

Hides the given view. The view must belong to this page.

Parameters
viewthe view to hide
virtual void berry::IWorkbenchPage::HideView ( IViewReference::Pointer  view)
pure virtual

Hides the given view that belongs to the reference, if any.

Parameters
viewthe references whos view is to be hidden
virtual bool berry::IWorkbenchPage::IsEditorPinned ( IEditorPart::Pointer  editor)
pure virtual

Returns true if the editor is pinned and should not be reused.

Parameters
editorthe editor to test
Returns
boolean whether the editor is pinned
virtual bool berry::IWorkbenchPage::IsPartVisible ( IWorkbenchPart::Pointer  part)
pure virtual

Returns true if perspective with given id contains view with given id Returns whether the specified part is visible.

Parameters
partthe part to test
Returns
boolean true if part is visible
virtual IEditorPart::Pointer berry::IWorkbenchPage::OpenEditor ( IEditorInput::Pointer  input,
const QString &  editorId 
)
pure virtual

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
inputthe editor input
editorIdthe id of the editor extension to use
Returns
an open and active editor, or null if an external editor was opened
Exceptions
PartInitExceptionif the editor could not be created or initialized
virtual IEditorPart::Pointer berry::IWorkbenchPage::OpenEditor ( IEditorInput::Pointer  input,
const QString &  editorId,
bool  activate 
)
pure virtual

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
inputthe editor input
editorIdthe id of the editor extension to use
activateif true the editor will be activated
Returns
an open editor, or null if an external editor was opened
Exceptions
PartInitExceptionif the editor could not be created or initialized

virtual IEditorPart::Pointer berry::IWorkbenchPage::OpenEditor ( IEditorInput::Pointer  input,
const QString &  editorId,
bool  activate,
int  matchFlags 
)
pure virtual

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
inputthe editor input
editorIdthe id of the editor extension to use
activateif true the editor will be activated
matchFlagsa 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
PartInitExceptionif the editor could not be created or initialized
See also
MATCH_NONE
MATCH_INPUT
MATCH_ID

virtual void berry::IWorkbenchPage::ResetPerspective ( )
pure virtual

Removes the property change listener.

Parameters
listenerthe property change listener to remove 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().

virtual void berry::IWorkbenchPage::ReuseEditor ( IReusableEditor::Pointer  editor,
IEditorInput::Pointer  input 
)
pure virtual

Removes the perspective specified by desc.

Parameters
descthe perspective that will be removed Reuses the specified editor by setting its new input.
editorthe editor to be reused
inputthe new input for the reusable editor
virtual bool berry::IWorkbenchPage::SaveAllEditors ( bool  confirm)
pure virtual

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
confirmtrue to ask the user before saving unsaved changes (recommended), and false to save unsaved changes without asking
Returns
true if the command succeeded, and false if the operation was canceled by the user or an error occurred while saving
virtual bool berry::IWorkbenchPage::SaveEditor ( IEditorPart::Pointer  editor,
bool  confirm 
)
pure virtual

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
editorthe editor to close
confirmtrue to ask the user before saving unsaved changes (recommended), and false to save unsaved changes without asking
Returns
true if the command succeeded, and false if the editor was not saved
virtual void berry::IWorkbenchPage::SavePerspective ( )
pure virtual

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.

virtual void berry::IWorkbenchPage::SavePerspectiveAs ( IPerspectiveDescriptor::Pointer  perspective)
pure virtual

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
perspectivethe perspective descriptor to save to
virtual void berry::IWorkbenchPage::SetPerspective ( IPerspectiveDescriptor::Pointer  perspective)
pure virtual

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
perspectivethe perspective descriptor
virtual IViewPart::Pointer berry::IWorkbenchPage::ShowView ( const QString &  viewId)
pure virtual

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
viewIdthe id of the view extension to use
Returns
the shown view
Exceptions
PartInitExceptionif the view could not be initialized
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
viewIdthe id of the view extension to use
secondaryIdthe secondary id to use, or null for no secondary id
modethe activation mode. Must be VIEW_ACTIVATE, VIEW_VISIBLE or VIEW_CREATE
Returns
a view
Exceptions
PartInitExceptionif the view could not be initialized
IllegalArgumentExceptionif the supplied mode is not valid

Member Data Documentation

const QString berry::IWorkbenchPage::CHANGE_ACTION_SET_HIDE
static

Change event id when an action set is hidden in a perspective.

See also
IPerspectiveListener

Definition at line 159 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::CHANGE_ACTION_SET_SHOW
static

Change event id when an action set is shown in a perspective.

See also
IPerspectiveListener

Definition at line 152 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::CHANGE_EDITOR_AREA_HIDE
static

Change event id when the editor area is hidden in a perspective.

See also
IPerspectiveListener

Definition at line 145 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::CHANGE_EDITOR_AREA_SHOW
static

Change event id when the editor area is shown in a perspective.

See also
IPerspectiveListener

Definition at line 138 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::CHANGE_EDITOR_CLOSE
static

Change event id when one or more editors are closed in a perspective.

See also
IPerspectiveListener

Definition at line 131 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::CHANGE_EDITOR_OPEN
static

Change event id when one or more editors are opened in a perspective.

See also
IPerspectiveListener

Definition at line 124 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::CHANGE_RESET
static

Change event id when the perspective is reset to its original state.

See also
IPerspectiveListener

Definition at line 94 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::CHANGE_RESET_COMPLETE
static

Change event id when the perspective has completed a reset to its original state.

Since
3.0
See also
IPerspectiveListener

Definition at line 103 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::CHANGE_VIEW_HIDE
static

Change event id when one or more views are hidden in a perspective.

See also
IPerspectiveListener

Definition at line 117 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::CHANGE_VIEW_SHOW
static

Change event id when one or more views are shown in a perspective.

See also
IPerspectiveListener

Definition at line 110 of file berryIWorkbenchPage.h.

const QString berry::IWorkbenchPage::EDITOR_ID_ATTR
static

An optional attribute within a workspace marker (IMarker) which identifies the preferred editor type to be opened when openEditor is called.

See also
#openEditor(IEditorInput, String)
#openEditor(IEditorInput, String, boolean)
Deprecated:
in 3.0 since the notion of markers this is not generally applicable. Use the IDE-specific constant IDE.EDITOR_ID_ATTR.

Definition at line 87 of file berryIWorkbenchPage.h.

const int berry::IWorkbenchPage::MATCH_ID
static

Editor opening match mode specifying that the editor id should be considered when matching against existing editors.

Definition at line 199 of file berryIWorkbenchPage.h.

Referenced by QmitkFunctionality::GetActiveStdMultiWidget(), QmitkOpenXnatEditorAction::Run(), and QmitkDataManagerView::ShowIn().

const int berry::IWorkbenchPage::MATCH_INPUT
static

Editor opening match mode specifying that the editor input should be considered when matching against existing editors.

Definition at line 193 of file berryIWorkbenchPage.h.

Referenced by QmitkCloseProjectAction::Run().

const int berry::IWorkbenchPage::MATCH_NONE
static

Editor opening match mode specifying that no matching against existing editors should be done.

Definition at line 187 of file berryIWorkbenchPage.h.

const int berry::IWorkbenchPage::VIEW_ACTIVATE
static

Show view mode that indicates the view should be made visible and activated. Use of this mode has the same effect as calling showView(String).

Definition at line 166 of file berryIWorkbenchPage.h.

const int berry::IWorkbenchPage::VIEW_CREATE
static

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.

Definition at line 181 of file berryIWorkbenchPage.h.

const int berry::IWorkbenchPage::VIEW_VISIBLE
static

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.

Definition at line 173 of file berryIWorkbenchPage.h.


The documentation for this struct was generated from the following files: