Resolving package URI from workspace plugin with E4 model editor [message #1793829] |
Thu, 16 August 2018 16:07 |
Elias Vasylenko Messages: 19 Registered: December 2015 |
Junior Member |
|
|
I have an emf model which extends the E4 application model with a couple of new MUIElements. If I add the project containing the model to my target platform and launch a new Eclipse instance it works fine, and I can reference the new element from an .e4xmi editor in the new instance.
(There is no editor registered for it yet, it just shows the default (unknown model element) but this is fine, I'm happy to edit the XMI directly for now.)
So I can resolve the model extensions if the plugin is contained in the *running instance*, but this isn't very useful for me. I want to be able to resolve them when the plugin is in the *current workspace*.
Looking at the few discussions & examples I can find around the internet it seems that it should be possible, but I can't get it to work. I'm getting the following exception:
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.saiman.co.uk/eclipse/2018/UISaiman/ui' not found. (platform:/resource/uk.co.saiman.msapex/Application.e4xmi, 44, 112)
I wasn't sure if it would be best to post this under EMF or E4, apologies if this is the wrong place.
Edit: it may be important that I'm using Bndtools not e.g. Tycho to build the project. I copied the manifest to META-INF/MANIFEST.MF in the project directory and this seemed sufficient for Eclipse to recognise it as a plugin project, and again this allows it to be resolved into the target platform and run in a new instance just fine. How does Eclipse resolve emf models from the workspace?
[Updated on: Thu, 16 August 2018 16:11] Report message to a moderator
|
|
|
|
|
|
Re: Resolving package URI from workspace plugin with E4 model editor [message #1793852 is a reply to message #1793845] |
Fri, 17 August 2018 09:26 |
Ed Merks Messages: 33254 Registered: July 2009 |
Senior Member |
|
|
If everything you're testing works without the generated model's actual code being needed, i.e., it works with a dynamic model, that you could make use of that capability. But of course if your generated code is needed, the compiled byte code needs to be in the running IDE.
As for setting up a usable environment, consider how easy it is to set of an EMF development environment.
https://ci.eclipse.org/emf/
In that automatically setup environment, there is an external tools launch configure to do the Tycho build. And once that build is finished, it's trivial to create a p2 task on the installation setup to install the EMF SDK into the IDE. Though it seems to me in general one normally expects to need to launch a runtime application in order to test the code in your development environment, and that this self-boostrapping scenario is kind of a rare requirement...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03232 seconds