Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "JWT Extensions"

m (Adding Property Sheet Pages)
(Adding Property Sheet Pages)
Line 20: Line 20:
 
[[Image:jwt_we_multitabproperties_singletab.gif|frame|none|The multi-tab sheet with the ''Standard'' tab that shows the model element properties]]
 
[[Image:jwt_we_multitabproperties_singletab.gif|frame|none|The multi-tab sheet with the ''Standard'' tab that shows the model element properties]]
  
To add a new property sheet page to the editor, it is necessary to define a new property tab in the plugin.xml and fill it with one or more property sections. The implementation of property sections is described in [http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html|this] Eclipse article.
+
To add a new property sheet page to the editor, it is necessary to define a new property tab in the plugin.xml and fill it with one or more property sections. The implementation of property sections is described in this Eclipse article: [http://www.eclipse.org/articles/Article-Tabbed-Properties/tabbed_properties_view.html].
 +
Once the property section have been implemented, they can be registered with the property tab. The required steps are:
  
* extension point mit tab und sections erweitern
+
* Create a new plugin project
* siehe artikel für implementierung
+
* Add jwt-we to your project dependencies
 +
* Add an extension for the point '''org.eclipse.ui.views.properties.tabbed.propertyTabs'''
 +
* Create a new '''propertyTabs''' child element for this extension point and set its '''contributorID''' to '''org.eclipse.jwt.we.editors.WEEditor'''
 +
* create a new '''propertyTab''' child element for each property tab that you wish to add to the property sheet. The '''label''' corresponds to the displayed name of the tab (use % as prefix to load a language specific caption from plugin.properties). The '''category''' should be set to '''WEStandardCategory'''. The '''id''' should be a unique identifier (use '''org.eclipse.jwt.we. as prefix''') and setting '''afterTab''' to '''org.eclipse.jwt.we.PropertyTabStandard''' will ensure that the standard tab remains the topmost tab entry.
  
 
[[Image:jwt_we_multitabproperties_addtab.gif|frame|none|An additional tab named ''Advanced'' was added to the multi-tab property sheet]]
 
[[Image:jwt_we_multitabproperties_addtab.gif|frame|none|An additional tab named ''Advanced'' was added to the multi-tab property sheet]]

Revision as of 12:29, 14 July 2008

This page provides information on how to extend the JWT Workflow Editor (JWT-WE).

Overview

The JWT Workflow Editor defines several extension points and mechanisms that allow users to customize and extend the abilities and properties of JWT-WE without changing the editor itself. However, there may be cases in which it becomes necessary to alter the Workflow Editor code itself, notably when the new features need to be implemented by committers of the JWT project. This page is intended to describe how third party suppliers can extend JWT-WE (e.g. with custom views on the model elements) through external plugins using the defined extension points as well as how JWT committers can deal with recurring tasks like adding new options to the Eclipse preferences dialog.

Extending JWT-WE through Plugins

The JWT-WE Platform

Adding Actions to Menu/Toolbar

Adding Views

Adding Property Sheet Pages

The workflow editor contains support for a multi-tab property sheet (TabbedPropertiesView) which is only activated if additional tabs are provided by plugins. If this is not the case, the classical property sheet is used which does not display any tabs. If the multi-tab sheet is used, a single tab Standard is always shown, which contains the model element properties as would be normally shown in the classical property sheet.

The classical property sheet without tabs that shows the model element properties
The multi-tab sheet with the Standard tab that shows the model element properties

To add a new property sheet page to the editor, it is necessary to define a new property tab in the plugin.xml and fill it with one or more property sections. The implementation of property sections is described in this Eclipse article: [1]. Once the property section have been implemented, they can be registered with the property tab. The required steps are:

  • Create a new plugin project
  • Add jwt-we to your project dependencies
  • Add an extension for the point org.eclipse.ui.views.properties.tabbed.propertyTabs
  • Create a new propertyTabs child element for this extension point and set its contributorID to org.eclipse.jwt.we.editors.WEEditor
  • create a new propertyTab child element for each property tab that you wish to add to the property sheet. The label corresponds to the displayed name of the tab (use % as prefix to load a language specific caption from plugin.properties). The category should be set to WEStandardCategory. The id should be a unique identifier (use org.eclipse.jwt.we. as prefix) and setting afterTab to org.eclipse.jwt.we.PropertyTabStandard will ensure that the standard tab remains the topmost tab entry.
An additional tab named Advanced was added to the multi-tab property sheet

Adding Meta Model Extensions

Integrate new Features into JWT-WE

Adding Preferences

Adding Menu/Toolbar Entry

Back to the top