| how to add a new attribute to the bpmn2 model without any extension [message #1067965] |
Thu, 11 July 2013 09:05  |
wei na Messages: 7 Registered: July 2013 |
Junior Member |
|
|
|
hi,here I have some quesions, hoping that you can take me out. I want to add a new attribute to the model, take UserTask for example. I change the model in BPMN.ecore, and regenerate the code., hoping that the new attribute can show up in the propertysheet,but it didn't. do i need to do more , like adding a model enablement in the plugin.xml? can you help me to solve this problem? thank you!
|
|
|
| Re: how to add a new attribute to the bpmn2 model without any extension [message #1067973 is a reply to message #1067965] |
Thu, 11 July 2013 09:47   |
|
Most of the bpmn2 elements have their own property tabs. For the User Task, the property tab is defined in the org.eclipse.bpmn2.modeler.ui plugin.xml and looks like this:
<propertyTab
id="org.eclipse.bpmn2.modeler.userTask.tab"
replaceTab="org.eclipse.bpmn2.modeler.task.tab"
afterTab="org.eclipse.bpmn2.modeler.description.tab"
class="default"
features="implementation resources renderings isForCompensation"
type="org.eclipse.bpmn2.UserTask"
label="User Task">
</propertyTab>
where the class="default" means "use the default detail composite class, DefaultDetailComposite" and the features="implementation ...etc." indicates the class features that are to be rendered. The default detail composite recognizes various feature types, like boolean string, references, list, etc. (see the ObjectEditor base class and all of its subclasses).
You'll have to add your new class feature to this list if you want it to show up in the property tab. Alternatively you could write your own custom detail class - there are many examples of this already in the editor code.
Have fun!
Bob
|
|
|
|
Powered by
FUDForum. Page generated in 0.01886 seconds