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.
Difference between revisions of "Custom Stereotype Dialogs"
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
*Full name : org.eclipse.tigerstripe.workbench.base.customStereotypeDialog | *Full name : org.eclipse.tigerstripe.workbench.base.customStereotypeDialog | ||
− | Purpose : This extension point is designed to allow users to override the "standard" Stereotype Dialogs with | + | Purpose : This extension point is designed to allow users to override the "standard" Stereotype Dialogs with replacements that implement logic that is specific to the given Stereotype. Some Stereotypes may refer to other model elements, or have complex string structures that the user has to enter. By creating custom dialogs, the end-user experience can be enhanced and simplified. |
*Usage : | *Usage : | ||
− | There are | + | There are two elements to be provided : |
''dialog_class'' : The dialog must extend the class : | ''dialog_class'' : The dialog must extend the class : | ||
Line 17: | Line 17: | ||
Through the protected fields of IStereotypeInstance instance and IStereotypeCapable component, you can access the model using the Tigerstripe Model APIs. | Through the protected fields of IStereotypeInstance instance and IStereotypeCapable component, you can access the model using the Tigerstripe Model APIs. | ||
− | ''stereotypeName'' : This should be the name of the | + | ''stereotypeName'' : This should be the name of the Stereotype for whihc this Dialog is valid. |
− | Note : the | + | Note : the implementation of the Dialog is reponsible for determining if it is applicable for the given Model Component - use the "accprt() method if the Dialog only works on some component types. |
Latest revision as of 07:51, 14 February 2017
< To: Tigerstripe Extension Points
- Full name : org.eclipse.tigerstripe.workbench.base.customStereotypeDialog
Purpose : This extension point is designed to allow users to override the "standard" Stereotype Dialogs with replacements that implement logic that is specific to the given Stereotype. Some Stereotypes may refer to other model elements, or have complex string structures that the user has to enter. By creating custom dialogs, the end-user experience can be enhanced and simplified.
- Usage :
There are two elements to be provided :
dialog_class : The dialog must extend the class :
org.eclipse.tigerstripe.workbench.ui.AbstractStereotypeInstanceEditDialog. As with other Dialog types, the main method for implementation is :
public Control createDialogArea(Composite parent) .....
Through the protected fields of IStereotypeInstance instance and IStereotypeCapable component, you can access the model using the Tigerstripe Model APIs.
stereotypeName : This should be the name of the Stereotype for whihc this Dialog is valid.
Note : the implementation of the Dialog is reponsible for determining if it is applicable for the given Model Component - use the "accprt() method if the Dialog only works on some component types.