Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Custom property tab
Custom property tab [message #1219884] Fri, 06 December 2013 14:24 Go to next message
Cédric Casenove is currently offline Cédric CasenoveFriend
Messages: 15
Registered: December 2013
Junior Member
Hi,

I am trying to add a custom property tab only on a StartEvent object that contains a MessageEventDefinition.

I used the extension point org.eclipse.bpmn2.modeler.runtime and propertyTab element to do that. I set the type property to "org.eclipse.bpmn2.StartEvent" and check if the selected start event contains a message definition inside the appliesTo() method of my custom property section class that extends DefaultPropertySection.

When I create a new start event by dragging the Message Start Event of the jBPM tool palette (from Start Events category), the method appliesTo() is called but the start event does not contain any event definition at this time (I use the StartEvent.getEventDefinitions() method which returns an empty array). However, if I save the model, close it and re-open it, then when I select the start event, the event definition is here.

Do you know what I am doing wrong ?

Thanks.
Re: Custom property tab [message #1220814 is a reply to message #1219884] Fri, 13 December 2013 18:38 Go to previous messageGo to next message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 617
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Cedric,

This is because the toolpalette entry you are using is actually a "compound create feature" - it creates the StartEvent first, then the Event Definition. The appliesTo(EObject) method will be called several times during creation and will not see the Event Definition at first, but it should be there eventually Wink

Cheers,
Bob
Re: Custom property tab [message #1221362 is a reply to message #1219884] Tue, 17 December 2013 14:16 Go to previous messageGo to next message
Cédric Casenove is currently offline Cédric CasenoveFriend
Messages: 15
Registered: December 2013
Junior Member
Hi Bob,

thanks for the answer.
In my appliesTo() method implementation, I returned true when I have a start event containing a message definition, and false otherwise. I modified my implementation and now it returns super.appliesTo() (from DefaultPropertySection) instead of returning false and it works. I think I bypassed the process when directly returning false.

Regards,
Cédric

Re: Custom property tab [message #1221365 is a reply to message #1221362] Tue, 17 December 2013 14:28 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 617
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Great! I'm glad it worked Smile
Previous Topic:how to show the property tab of new elements
Next Topic:InputOutputSpecification has missing or Incomplete Input Set
Goto Forum:
  


Current Time: Sun Nov 23 22:46:49 GMT 2014

Powered by FUDForum. Page generated in 0.01785 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software