|Re: Loading Representation File(s) [message #1781821 is a reply to message #1781806]
||Tue, 13 February 2018 15:05
|| Maxime Porhel
Registered: July 2009
Location: Nantes, France
Hi Muhammad, |
You should load only the Sirius session, it will load all the necessaray resources (semantic, representation, ... ) in the same resource set (and in the same way than Capella if you open the aird by double clic or with the contextual menu)
Session session = SessionManager.INSTANCE.getSession(URI.createURI(projectName+"/"+airdFile), new NullProgressMonitor());
You need to call session.open()
Note that you do not need to call your loadModel method (it would load the semantic model in your own resourceSet without any reference to/from the session)
Note also that if your Capella project is open, SessionManager.INSTANCE.getSession() will return the loaded session, and you will manipulate the same object than the workbench. In this case, calling session.open will do nothing, but you should avoid to close it at the end of your generation to keep the session in the same state than before your action.
Maxime Porhel - Obeo
Need training or professional services for Sirius?
Powered by FUDForum
. Page generated in 0.02724 seconds