Reputation: 2064
I would like to conceptually understand how Eclipse keeps track of its current resources in its environment, specifically (.ecore) files.
For example, when I right-click on an ecore file and click "Load Resources" and then click the button "Browse registered packages" (see the picture below), how eclipse populates this list.
Upvotes: 1
Views: 301
Reputation: 1544
If you want to access this information programmatically, have a look at org.eclipse.emf.ecore.EPackage.Registry.INSTANCE, it contains the global EPackage registry used by EMF.
This list is populated by the extensions declared in the file plugin.xml of the Eclipse plugin with a model generated by EMF (create a genmodel for your ecore and generate the model part of the code by right-clicking on the root of the genmodel). Here is an example of the result for a Dart metamodel.
Upvotes: 1