Medical Imaging Interaction Toolkit
2023.04.00
Medical Imaging Interaction Toolkit
|
org.blueberry.ui.editors
This extension point is used to add new editors to the workbench. A editor is a visual component within a workbench page. It is typically used to edit or browse a document or input object. To open an editor, the user will typically invoke "Open" on an IFile
. When this action is performed the workbench registry is consulted to determine an appropriate editor for the file type and then a new instance of the editor type is created. The actual result depends on the type of the editor. The workbench provides support for the creation of internal editors, which are tightly integrated into the workbench, and external editors, which are launched in a separate frame window. There are also various levels of integration between these extremes.
In the case of an internal editor tight integration can be achieved between the workbench window and the editor part. The workbench menu and toolbar are pre-loaded with a number of common actions, such as cut, copy, and paste. The active part, view or editor, is expected to provide the implementation for these actions. An internal editor may also define new actions which appear in the workbench window. These actions only appear when the editor is active.
The integration between the workbench and external editors is more tenuous. In this case the workbench may launch an editor but after has no way of determining the state of the external editor or collaborating with it by any means except through the file system.
point
: a fully qualified identifier of the target extension pointid
: an optional identifier of the extension instancename
: an optional name of the extension instanceid
: a unique name that will be used to identify this editorname
: a translatable name that will be used in the UI for this editoricon
: A relative name of the icon that will be used for all resources that match the specified extensions. Editors should provide an icon to make it easy for users to distinguish between different editor types. If you specify a command rather than a class, an icon is not needed. In that case, the workbench will use the icon provided by the operating system.extensions
: an optional field containing the list of file types understood by the editor. This is a string containing comma separate file extensions. For instance, an editor which understands hypertext documents may register for "htm, html".class
: the name of a class that implements berry::IEditorPart. The attributes class
, command
, and launcher
are mutually exclusive. If this attribute is defined then contributorClass
should also be defined.command
: a command to run in order to launch an external editor. The executable command must be located on the system path or in the plug-in's directory. The attributes class, command, and launcher are mutually exclusive.launcher
: the name of a class which that implements berry::IEditorLauncher. A launcher will open an external editor. The attributes class
, command
, and launcher
are mutually exclusive.contributorClass
: the name of a class that implements berry::IEditorActionBarContributor. This attribute should only be defined if the class
attribute is defined. This class is used to add new actions to the workbench menu and tool bar which reflect the features of the editor type.default
: if true, this editor will be used as the default editor for the type. This is only relevant in a case where more than one editor is registered for the same type. If an editor is not the default for the type, it can still be launched using "Open with..." submenu for the selected resource. Please note that this attribute is only honored for filename and extension associations at this time. It will not be honored for content type bindings. Content type-based resolution will occur on a first come, first serve basis and is not explicitly specified.filenames
: an optional field containing the list of file names understood by the editor. This is a string containing comma separate file names. For instance, an editor which understands specific hypertext documents may register for "ejb.htm, ejb.html".matchingStrategy
: the name of a class that implements berry::IEditorMatchingStrategy. This attribute should only be defined if the class
attribute is defined. This allows the editor extension to provide its own algorithm for matching the input of one of its editors to a given editor input.Advertises that the containing editor understands the given content type and is suitable for editing files of that type.
contentTypeId
: The content type identifier. This is an ID defined by the org.blueberry.core.runtime.contentTypes
extension point.The following is an example of an internal editor extension definition:
The workbench provides a "Default Text Editor". The end user product may contain other editors as part of the shipping bundle. In that case, editors will be registered as extensions using the syntax described above.
org.blueberry.ui.keywords
The keywords extension point defines keywords and a unique id for reference by other schemas. See propertyPages
and preferencePages
.
point
: a fully qualified identifier of the target extension pointid
: an optional identifier of the extension instancename
: an optional name of the extension instanceid
: The id is the unique id used to reference the keywordlabel
: The human readable label of the keywordThe following is an example of a keyword extension:
Keywords are used only with preference and property pages. See the keywordReference
element of the org.blueberry.ui.propertyPages
and org.blueberry.ui.preferencePages
extension points.
org.blueberry.ui.perspectiveExtensions
This extension point is used to extend perspectives registered by other plug-ins. A perspective defines the initial contents of the window action bars (menu and toolbar) and the initial set of views and their layout within a workbench page. Other plug-ins may contribute actions or views to the perspective which appear when the perspective is selected. Optional additions by other plug-ins are appended to the initial definition.
point
: a fully qualified identifier of the target extension pointid
: an optional identifier of the extension instancename
: an optional name of the extension instancetargetID
: the unique identifier of the perspective (as specified in the registry) into which the contribution is made. If the value is set to "*" the extension is applied to all perspectives.id
: the unique identifier of the action set which will be added to the perspective.id
: the unique identifier of the view which will be added to the perspective's "Show View" submenu of the "Window" menu.id
: the unique identifier of the perspective which will be added to the perspective's "Open Perspective" submenu of the "Window" menu.id
: the unique identifier of the new wizard which will be added to the perspective's "New" submenu of the "File" menu.id
: the unique identifier of the view which will be added to the perspective's "Show In..." prompter in the Navigate menu.id
: the unique identifier of the view which will be added to the perspective layout.relative
: the unique identifier of a view which already exists in the perspective. This will be used as a reference point for placement of the view. The relationship between these two views is defined by relationship
. Ignored if relationship is "fast".relationship
: specifies the relationship between id
and relative
. The following values are supported:fast
: the view extension will be created as a fast view.stack
: the view extension will be stacked with the relative view in a folder.left, right, top, bottom
: the view extension will be placed beside the relative view. In this case a ratio
must also be defined.ratio
: the percentage of area within the relative view which will be donated to the view extension. If the view extension is a fast view, the ratio is the percentage of the workbench the fast view will cover when active. This must be defined as a floating point value and lie between 0.05 and 0.95.visible
: whether the view is initially visible when the perspective is opened. This attribute should have a value of "true" or "false" if used. If this attribute is not used, the view will be initially visible by default.closeable
: whether the view is closeable in the target perspective. This attribute should have a value of "true" or "false" if used. If this attribute is not used, the view will be closeable, unless the perspective itself is marked as fixed.moveable
: whether the view is moveable. A non-moveable view cannot be moved either within the same folder, or moved between folders in the perspective. This attribute should have a value of "true" or "false" if used. If this attribute is not used, the view will be moveable, unless the perspective itself is marked as fixed.standalone
: whether the view is a standalone view. A standalone view cannot be docked together with others in the same folder. This attribute should have a value of "true" or "false" if used. This attribute is ignored if the relationship attribute is "fast" or "stacked". If this attribute is not used, the view will be a regular view, not a standalone view (default is "false").showTitle
: whether the view's title is shown. This attribute should have a value of "true" or "false" if used. This attribute only applies to standalone views. If this attribute is not used, the view's title will be shown (default is "true").minimized
: If the perspective extension will result in a new view stack being created (i.e. the 'relationship' attribute is one of left, right, top or bottom) this field determines the new stack's initial display state.id
: The unique identifier of the Command which is to be removed from the menu. WARNING: This is considered to be a 'Product level' extension and should not be used in consumable plugins without great care.id
: The unique identifier of the Command which is to be removed from thetoolbar. WARNING: This is considered to be a 'Product level' extension and should not be used in consumable plugins without great care.The following is an example of a perspective extension (note the subelements and the way attributes are used):
In the example above, an action set, view shortcut, new wizard shortcut, and perspective shortcut are contributed to the initial contents of the Resource Perspective. In addition, the Package Explorer view is stacked on the Resource Navigator and the Type Hierarchy View is added beside the Resource Navigator.
org.blueberry.ui.perspective
This extension point is used to add perspective factories to the workbench. A perspective factory is used to define the initial layout and visible action sets for a perspective. The user can select a perspective by invoking the "Open Perspective" submenu of the "Window" menu.
point
: a fully qualified identifier of the target extension pointid
: an optional identifier of the extension instancename
: an optional name of the extension instanceid
: a unique name that will be used to identify this perspective.name
: a translatable name that will be used in the workbench window menu bar to represent this perspective.class
: a fully qualified name of the class that implements berry::IPerspectiveFactory interface.icon
: a relative name of the icon that will be associated with this perspective.fixed
: indicates whether the layout of the perspective is fixed. If true, then views created by the perspective factory are not closeable, and cannot be moved. The default is false.An optional subelement whose body should contain text providing a short description of the perspective.
The following is an example of a perspective extension:
The workbench provides a "Resource Perspective". Additional perspectives may be added by plug-ins. They are selected using the "Open Perspective" submenu of the "Window" menu.
org.blueberry.ui.preferencePages
The workbench provides one common dialog box for preferences. The purpose of this extension point is to allow plug-ins to add pages to the preference dialog box. When preference dialog box is opened (initiated from the menu bar), pages contributed in this way will be added to the dialog box.
point
: a fully qualified identifier of the target extension pointid
: an optional identifier of the extension instancename
: an optional name of the extension instanceid
: a unique name that will be used to identify this page.name
: a translatable name that will be used in the UI for this page.class
: a name of the fully qualified class that implements berry::IWorkbenchPreferencePage.category
: a path indicating the location of the page in the preference tree. The path may either be a parent node ID or a sequence of IDs separated by '/', representing the full path from the root node.A reference by a preference page to a keyword. See the keywords extension point.
id
: The id of the keyword being referred to.The following is an example for the preference extension point:
The workbench adds several pages for setting the preferences of the platform. Pages registered through this extension will be added after them according to their category information.
org.blueberry.ui.presentationFactories
This extension point is used to add presentation factories to the workbench. A presentation factory defines the overall look and feel of the workbench, including how views and editors are presented.
class
: Specify the fully qualified class to be used for the presentation factory. The specified value must implement the interface berry::IPresentationFactory.id
: a unique name that will be used to identify this presentation factoryname
: a translatable name that can be used to show this presentation factory in the UIThe following is an example of a presentationFactory extension:
If a presentation factory is not specified or is missing then the implementation in berry::QtWorkbenchPresentationFactory will be used.
org.blueberry.ui.services
Define service factories so that services can be contributed declaratively and will be available through berry::IServiceLocator::GetService(Class). The implementation of AbstractServiceFactory
must be able to return a global service and multiple child services (if applicable).
Contribute services to the workbench.
Match a service interface to a factory that can supply a hierachical implementation of that service.
factoryClass
: The factory that extends AbstractServiceFactory
and can create the implementation for the serviceClass
.A service this factory can provide.
serviceClass
: The interface that represents a service contract.A Source Provider supplies source variables to the IEvaluationService. It can also notify the IEvaluationService when one or more of the variables change.
provider
: This class must provide variables and call the appropriate fireSourceChanged(*)
method when any of the variables change.A source variable from this provider. A source provider must declare all variables that it provides.
name
: The name of a contributed source variable. It is a good practice to prepend the plugin id to the variable name to avoid collisions with other source providers.priorityLevel
: For conflict resolution used by services like the IHandlerService
, contributed source variables must assign a priority. workbench is the global default priority. See ISources
for relative priority information.Here is a basic definition:
The LevelServiceFactory can return an ILevelService when it is requested from the IServiceLocator:
In this test example, the factory would instantiate three ILevelService
implementations during the first call to GetSite()->GetService(*)
. The global one in the workbench, one for the workbench window, and one for the site.
org.blueberry.ui.tweaklets
Typically, although not required, the value of the definition
attribute is the fully qualified name without colons of an abstract class defined by the workbench, and the value of the implementation
attribute is the fully qualified name of a non-abstract class provided by the extending plug-in.
id
: a unique name that will be used to identify this tweakletname
: a translatable name that will be used in the UI for this tweakletdescription
: a translatable short description of this tweaklet, to be used in the UIdefinition
: an identifier of the tweaklet definition in the workbench, typically a fully qualified type name without colonsimplementation
: an identifier of the tweaklet implementation provided by the extender, typically a fully qualified class nameTweaklets are usually used to specialize the workbench for a specific GUI toolkit.
org.blueberry.ui.views
This extension point is used to define additional views for the workbench. A view is a visual component within a workbench page. It is typically used to navigate a hierarchy of information (like the workspace), open an editor, or display properties for the active editor. The user can make a view visible from the Window > Show View menu or close it from the view local title bar.
In order to reduce the visual clutter in the Show View Dialog, views should be grouped using categories.
point
: a fully qualified identifier of the target extension pointid
: an optional identifier of the extension instancename
: an optional name of the extension instanceid
: a unique name that will be used to identify this categoryname
: a translatable name that will be used in the UI for this categoryparentCategory
: an optional path composed of category IDs separated by '/'. This allows the creation of a hierarchy of categories.id
: a unique name that will be used to identify this viewname
: a translatable name that will be used in the UI for this viewcategory
: an optional attribute that is composed of the category IDs separated by '/'. Each referenced category must be declared in a corresponding category element.class
: a fully qualified name of the class that implements berry::IViewPart. A common practice is to subclass berry::ViewPart or berry::QtViewPart in order to inherit the default functionality.icon
: a relative name of the icon that will be associated with the view.fastViewWidthRatio
: the percentage of the width of the workbench that the view will take up as an active fast view. This must be defined as a floating point value and lie between 0.05 and 0.95. If no value is supplied, a default ratio will be used.allowMultiple
: flag indicating whether this view allows multiple instances to be created using IWorkbenchPage::ShowView(QString id, QString secondaryId). The default is false.restorable
: flag indicating whether this view allows to be restored upon workbench restart. If set to false, the view will not be open after a workbench restart. The default is true.An optional subelement whose body should contain text providing a short description of the view.
The following is an example of a sticky view declaration:
The BlueBerry Platform provides a number of standard views. From the user point of view, these views are no different from any other view provided by the plug-ins. All the views can be shown from the "Show View" submenu of the "Window" menu. The position of a view is persistent: it is saved when the view is closed and restored when the view is reopened in a single session. The position is also persisted between workbench sessions.