Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Use External EMF Resource
Use External EMF Resource [message #1760170] Mon, 24 April 2017 08:40 Go to next message
Matt Se is currently offline Matt SeFriend
Messages: 29
Registered: February 2016
Junior Member
Hi,

I'm using an external, non-containment, EMF Resource inside my actual Diagram Model.

When the diagram gets initilaized I add this external resource with an
AddSemanticResourceCommand
to the session of my diagram Model.

However I get the following message.

Impossible to find an interpreter - Could not find a session for model element :
!STACK 0
java.lang.RuntimeException


After I close and reopen my project everything is working fine. I look up the Bugzillas known for that issues but they didn't get me anywhere.

How can I properly use external EMF Resources inside my diagram?

Thanks in advance,
Matt
Re: Use External EMF Resource [message #1760173 is a reply to message #1760170] Mon, 24 April 2017 09:08 Go to previous message
Matt Se is currently offline Matt SeFriend
Messages: 29
Registered: February 2016
Junior Member
It seems the Resource gets copied within the AddSemanticResourceCommand process.
I solved my problem by looking up the URI afterwards like:
for (Resource resource : session.getSemanticResources()) {
			if (resource.getURI().equals(externalResource.getURI())) {
			    ....

			    break;
			}
		    }

and use this resource.

But it's more of a hack than a clean solution...
Any Recommendations?
Previous Topic:[Edapt] Creating history from existing model versions
Next Topic:Set Coordinates/Position from Node Creation Tool ?
Goto Forum:
  


Current Time: Thu May 09 13:35:10 GMT 2024

Powered by FUDForum. Page generated in 0.04133 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top