|
|
Re: Creating a custom Capsule [message #1749957 is a reply to message #1749947] |
Wed, 14 December 2016 13:39 |
|
Hi, Patrik,
I think what you need is to advise the ConfigureRequest by which the command is obtained by the edit-helper that creates the capsule to configure that new capsule. Every new element created by the edit-helper framework is configured in this way after creation.
So, your configure advice can re-entrantly invoke the edit-helper framework to add a command that creates the state machine in the new capsule. The ConfigureRequest, because it is configuring the new capsule, already has the capsule type that you need from which to obtain the RT state machine creation command in the getTypeToConfigure().
HTH,
Christian
|
|
|
Re: Creating a custom Capsule [message #1749963 is a reply to message #1749947] |
Wed, 14 December 2016 13:56 |
|
Hi Patrick,
To create an element base on its element type, I advise you to use this method: org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils.getCreateChildCommandWithContext(EObject, IHintedType)
This will return you a command that you can execute on the editing domain command stack or null or an unexecutable command depending on the ability to create the element or not in the specified context.
HTH,
Rémi
Remi Schnekenburger
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
|
|
|
Re: Creating a custom Capsule [message #1750052 is a reply to message #1750050] |
Thu, 15 December 2016 13:56 |
|
Does it work without your new specific diagram type? There was a bug in Papyrus-RT, where synchro was lost for quite many elements. It has been restored today.
Otherwise, the viewpoint is in charge of the deployment of the css that enables the canonical for state machine diagrams. The viewpoint mechanism may tight the stylesheet to the exact kind of diagram, not the sub-kinds of the diagrams. You can try to add your own css to the viewpoint, with canonical mode added, and checks if it works.
IMO the CSS should be inherited, but I am not sure how the viewpoint engine handles the declared css currently.
There is a way to see easaily if synchro is activated => go to Property View, appearance tab => Synchronization (sync with model) should be true.
HTH
Rémi
Remi Schnekenburger
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03500 seconds