|Re: How to create UML elements from own popupactions [message #634005 is a reply to message #632249]
||Wed, 20 October 2010 09:09
| Remi Schnekenburger
Registered: July 2009
you could look in the plugins org.eclipse.papyrus.sysml.modelexplorer and org.eclipse.papyrus.sysml.service.types to see how we create SysML blocks directly from the model explorer, in the menu "create new child" etc.
Otherwise, there are many actions placed on the model explorer. For example, look into the org.eclipse.papyrus.uml.modelexplorer plugin.
The code you propose as an implementation of an action should take care of the fact that Papyrus as migrate to GMF and EMF Transaction.
Thus, it requires to encapsulate commands in a transaction, otherwise, you will have a read/write exception when modifying the model.
I invite you to read the documentation of EMF Transaction project.
Powered by FUDForum
. Page generated in 0.04575 seconds