Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Discovering referenced models
Discovering referenced models [message #484328] Sun, 06 September 2009 19:02 Go to next message
Kristian Duske is currently offline Kristian DuskeFriend
Messages: 64
Registered: July 2009
Member
Hi everyone,

I'm an EMF beginner and my questions is probably very basic. I have
searched the group, but couldn't find an answer.

I'm writing a graphical editor for the GMF mapping model, and for that
I need to be able to load a GMF model and discover the referenced
domain and graphical definition models. Both the GMF mapping model and
the GMF graphical definition models are (meta)modeled in ecore.

This is how I load the mapping model:

IFileEditorInput input = (IFileEditorInput) getEditorInput();
IPath path = input.getFile().getFullPath();
URI uri = URI.createPlatformResourceURI(path.toString(), true);

ResourceSet resourceSet = new ResourceSetImpl();
Resource resource = resourceSet.getResource(uri, true);

m_modelMapping = (Mapping) resource.getContents().get(0);

This works fine, but how can I discover the models that are referenced
by the mapping model? I thought I would be able to register a listener
to the resource set or something, but I can't see how. Could someone
point me in the right direction?

Thanks in advance
Kristian Duske
Re: Discovering referenced models [message #484350 is a reply to message #484328] Mon, 07 September 2009 07:21 Go to previous message
Kristian Duske is currently offline Kristian DuskeFriend
Messages: 64
Registered: July 2009
Member
Hi again,

I just realized I posted this to the wrong newsgroup. I wanted to post
in the emf group. I'm sorry for the noise.

Best regards
Kristian
Previous Topic:eugenia create node for abstract class
Next Topic:Laying out optional visual elements
Goto Forum:
  


Current Time: Fri Apr 26 15:17:17 GMT 2024

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

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

Back to the top