| Re: Adding instances in runtime from another diagram editor [message #1723839 is a reply to message #1723766]
||Thu, 18 February 2016 11:34
| Ángel Moreno
Registered: November 2013
Your question is not nothing simple, it's a complete project. Some tricks to start to work:
- Learn how to create Eclipse Plug-ins and how works Eclipse. Very Important!
- Using objectContributions, for example, as plug-in extensions of your diagram editor A, create some actions that helps you to collect the objects selected in the diagram "A" and save this objects in memory in some property of your class diagram editor A, adding public accesors to this class to give access from the environment to the selected objects.
- Later, in your diagram editor B, you must create some context menu actions (for example) that helps you to import the objects selected in the editor A. You must explore the editors opened and give support to the user to select the correct source diagram editor instance and access to the accesors created before... Other trick:
Give you the references to the opened editors
- In a third step, executed the before action over the diagram editor B, you must modify the underlining model resource (learn how to work EMF, Resources and ResourcesSets) associated with the diagram editor B, add the EObjects imported to this model, and make a refresh of the editor. It's posible that your imported objects appears delocalized.... For this reason it's posible that you must relocate this objects programmatically.
You have much work to do.... be patient... and research in the information available.
Regards and good luck with your develepment!!!
Researcher @ Kybele Research Group
Rey Juan Carlos University, Madrid, Spain
[Updated on: Thu, 18 February 2016 13:56]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.12043 seconds