Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » how to show the property tab of new elements
how to show the property tab of new elements [message #1218495] Fri, 29 November 2013 04:48 Go to next message
Javier Berrocal is currently offline Javier Berrocal
Messages: 6
Registered: November 2013
Junior Member
Hello,

I am creating an extension for BPMN2 Modeler. The new created elements extend the Group metaclass. These elements have a new attribute, "Importance" and in order to show it in the properties of the elements, I have created a propertyTab (in the Extensions tab of the MANIFEST.MF) for this feature. However, when I run the Plugin project and I create a new BPMN2 Model I get the following error :

"The Property Sheet is empty because the model element "Group" has no visible features
At least one of these element features must be enabled: Importance.
Please configure the Tool Enablement Preferences for this project accordingly"

To create the extension I have been following the CustomTask Example.
- I have create the propertyTab as is indicated in the Example for the "My Event Definition" element
- And I have also enable the object and the feature in the modelEnablement section of the plugin.xml
Someone knows if I have to make any other modification or define other properties?

Thank you very much
Re: how to show the property tab of new elements [message #1219577 is a reply to message #1218495] Wed, 04 December 2013 12:33 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 592
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

In order to display the extension attributes in the Property Tab, you need to add a <modelEnablement> element to your plugin.xml for the new feature, something like this:

	<modelEnablement
			runtimeId="org.my.runtime.id"
			type="Process"
			profile="My Profile">
		<enable object="Group" feature="Importance"/>

	</modelEnablement>


Let me know if you still have problems.

Bob
Re: how to show the property tab of new elements [message #1219676 is a reply to message #1219577] Thu, 05 December 2013 06:09 Go to previous messageGo to next message
Javier Berrocal is currently offline Javier Berrocal
Messages: 6
Registered: November 2013
Junior Member
Thank you very much. It has been very helpful.

The problem was that I did not activate the "Group" object and that I did not create the class NewElementPropertySection. I used the "default" class.

Nevertheless, I have another doubt (I hope this is the last one). When I use the new element (the one extending the Group artifact) in the model, it does not reflect anything special nor different from the standard Groups. For elements extending Tasks or Events, an associated icon is shown, but this icon is not shown for Groups. Is it possible to show a name and change the color of the new created Group in order to be easily recognizable?

Finally, when I create new elements, they are shown two times in the palette. Is there a way to show them only once (the same happens when I deploy the example CustomTask)?
Re: how to show the property tab of new elements [message #1219708 is a reply to message #1219676] Thu, 05 December 2013 08:58 Go to previous messageGo to next message
Robert Brodt is currently offline Robert Brodt
Messages: 592
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

You can change the appearance of the Group figure by overriding decorateShape(IAddContext,ContainerShape,Group) in your AddFeature class. Have a look at the AddGroupFeature to see the default Group rendering.

The duplicate toolpalette entries is a bug Embarrassed but it has been fixed in yesterday's nightly build.
Re: how to show the property tab of new elements [message #1219840 is a reply to message #1219708] Fri, 06 December 2013 03:52 Go to previous message
Javier Berrocal is currently offline Javier Berrocal
Messages: 6
Registered: November 2013
Junior Member
Thank you very much, Bob. All you indications have been very helpful.
Previous Topic:How does call activity work?
Next Topic:Custom property tab
Goto Forum:
  


Current Time: Sat Aug 30 06:32:57 EDT 2014

Powered by FUDForum. Page generated in 0.02170 seconds