Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Ecore Editor] Add Additional Resources programmatically(I want to add Additional Resources automatically when openning the Ecore Editor)
[Ecore Editor] Add Additional Resources programmatically [message #669971] Thu, 12 May 2011 05:07
Antoine  is currently offline Antoine
Messages: 22
Registered: February 2011
Location: Toulouse, France
Junior Member
Hello everybody,

I develop a plugin and I want that it adds automaticaly (by coding it) Additional Resources in the Outline view when I open the Ecore editor (just Ecore, or EcoreDiag Editor). That's because my ressources are dynamic, so I explore the DB of resources, I get URIs and I want to add them to the additional ressources.

For real, I want to add Additional resources in the SysML Editor of Topcased but I think the mechanism is the same.

Functionally, I don't know if we add resources to the model that we edit and the editor display them in the additional resources, or to the editor directly.

I try to use the API used by the Extension Point org.eclipse.uml2.uml.dynamic_package (the UMLPlugin class in fact, like in the example at the end) but I think this one is to add Profile to my SysML. I'm looking for a more generic thing, to add any ressources, another SysML model for example, to use it in the one that I'm editing.

I tried to find the executed code when we run the menu Load Resources in the Outline view, but I didn't find it...

Does anybody have ideas to do that ?

Thank you for reading until now

Antoine

Using the dynamic package:
import org.eclipse.uml2.uml.UMLPlugin;
[...]
UMLPlugin.getEPackageNsURIToProfileLocationMap().put(myURLString, URI.createURI("pathmap://RESOURCES/MyModel.sysml"));
Previous Topic:EcoreUtil.copy() that copies derived/noncontainment features?
Next Topic:Simple merge case
Goto Forum:
  


Current Time: Thu Aug 28 03:26:38 EDT 2014

Powered by FUDForum. Page generated in 0.01670 seconds