|
Re: Get model file location of current editing diagram [message #1699295 is a reply to message #1698955] |
Tue, 23 June 2015 09:31 |
|
Le 19/06/2015 09:35, Le Chau Nguyen a écrit :
> Hi folks,
Hello
>
> After having a model called club (club.ecore) and Sirius UI of it
> (club.odesign), I created a new Sirius model project then make a new
> model file inside by using "Example EMF Model Creation Wizards", let say
> the name is: example.club.
> And I extend the Sirius Tab bar in diagram editor to have an addition
> button named "Check".
> When click to "Check", I want to access to example.club to do some
> processing on this file.
> Could you teach me how to get the file location of the model file under
> the Diagram?
you can call
org.eclipse.sirius.business.api.query.EObjectQuery.getSession() to get
the session and then
org.eclipse.sirius.business.api.session.Session.getSemanticResources()
Once you get your semantic resources you can access the IFile. You may
refer to this post to handle it.
https://www.eclipse.org/forums/index.php/t/128695/
> When we change something in Diagram, the model file reflect according to
> the change. So Sirius handle the mapping between the diagram and the
> model file. But I can not find it yet, please help me. Sorry if it is
> naive question because I am Sirius newbie.
>
> Regards,
> Chau Nguyen
>
Regards
Laurent
Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.01378 seconds