Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » how to add a new attribute to the bpmn2 model without any extension(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)
how to add a new attribute to the bpmn2 model without any extension [message #1067965] Thu, 11 July 2013 09:05 Go to next message
wei na is currently offline 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 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 461
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

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
icon10.gif  Re: how to add a new attribute to the bpmn2 model without any extension [message #1068081 is a reply to message #1067973] Thu, 11 July 2013 21:45 Go to previous message
wei na is currently offline wei na
Messages: 7
Registered: July 2013
Junior Member
wow...seens like i made a mistake of adding a wrong name to the list.terrible mistake...thx a lot Embarrassed i may need more time to learn about plugin development.
Laughing
Previous Topic:Name attribute
Next Topic:How is STP different from BPMN2Modeler?
Goto Forum:
  


Current Time: Mon Oct 07 12:48:38 EDT 2013

Powered by FUDForum. Page generated in 0.01886 seconds