Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Accessing model elements from diagrams that are not opened in an editor
Accessing model elements from diagrams that are not opened in an editor [message #903482] Thu, 23 August 2012 15:53 Go to next message
Eclipse UserFriend
I wish to have several diagrams potentially containing many views of the same domain model objects. One diagram can for instance have several figures representing the same domain model element. I use a shared editing domain for all diagram editors.

I'm designing a command for deleting a domain model object. It is supposed to delete the domain model object itself and all views of the domain model object in all diagrams regardless of if they are open in an editor or not.

It seems that getEditingDomain().getResourceSet() only loads the objects in the open diagram + the objects in the domain model. Not until I open a particular diagram are the corresponding views added to the resource set.

What would be the best way to load all objects in the model so that I can delete them using the appropriate delete commands?

Thanks!

Arto
Re: Accessing model elements from diagrams that are not opened in an editor [message #903611 is a reply to message #903482] Fri, 24 August 2012 10:15 Go to previous message
Eclipse UserFriend
I have tried this: Find the project from the workspace root. Find all resources (files) in the project. Load all objects from the relevant files into the editing domain with loadResource(). Doing this naively I get copies of the resources already loaded and it just doesn't seem like a very elegant solution. Any thoughts or hints?

Arto
Previous Topic:Containment Feature owned by Domain Meta Element
Next Topic:Link to shortcut from different model
Goto Forum:
  


Current Time: Wed Jul 23 07:29:08 EDT 2025

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

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

Back to the top