Home » Modeling » Epsilon » Error in importing Epsilon project example
| | |
Re: Error in importing Epsilon project example [message #1776021 is a reply to message #1776020] |
Thu, 09 November 2017 12:22 |
|
Hi Marcelo,
If you follow the inheritance hierarchy, EtlModule extends IEolModule (EtlModule > IEtlModule > IErlModule > IEolModule) so you shouldn't be getting such errors. Could you please try to clean and rebuild all projects in your workspace in case it's a JDT caching problem?
Cheers,
Dimitris
|
|
| | | |
Re: Error in importing Epsilon project example [message #1776640 is a reply to message #1776030] |
Sun, 19 November 2017 19:55 |
Marcelo Rodrigues Messages: 21 Registered: November 2016 |
Junior Member |
|
|
Hi Dimitris,
I am reopening this topic because now I am facing another type of problem, however, in the same project [1].
I'm using a specific part of this sample project, which is the EVL part (package -> org.eclipse.epsilon.examples.standalone.evl). Summarizing what I did:
I changed the models and metamodels that were inside the package org.eclipse.epsilon.examples.standalone.models to the models and metamodels of another example project [2]. This project [2] where I took the models (and metamodels), is an example of how to use the ModeLink [3] editor to create a "relationship model".
So I changed the class EvlStandaloneExample (belonging to the package org.eclipse.epsilon.examples.standalone.evl ) so that I could add the models and metamodels of the project [2]. I had no difficulty running the project [1] after adding the models "persons.model" and "houses.model", as well as their respective metamodels. However, I'm not able to add the model "personshouses.model". I believe this is happening because it has attributes that are references to other models (persons.model and houses.model). The error happens in the method getModels() of the EvlStandaloneExample class, when I try to add the model "personshouses.model" in the list of models that this method returns.
I would be very happy if you could give me a direction.
Cheers,
Marcelo
[1] https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/examples/org.eclipse.epsilon.examples.standalone
[2] https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/examples/org.eclipse.epsilon.examples.modelink.personshouses
[3] https://www.eclipse.org/epsilon/doc/modelink/
[Updated on: Sun, 19 November 2017 20:10] Report message to a moderator
|
|
| | | | |
Re: Error in importing Epsilon project example [message #1776993 is a reply to message #1776979] |
Thu, 23 November 2017 13:26 |
|
Hi Marcelo,
Since you're using a metamodel (personshouses.ecore) that refers to other metamodels by URI you need to load your models using metamodel URIs instead of the metamodel .ecore files. Replacing your three models.add(...) statements with the following should do the trick.
EmfUtil.register(URI.createURI(getFileURI("models/persons.ecore").toString()), EPackage.Registry.INSTANCE);
EmfUtil.register(URI.createURI(getFileURI("models/houses.ecore").toString()), EPackage.Registry.INSTANCE);
EmfUtil.register(URI.createURI(getFileURI("models/personshouses.ecore").toString()), EPackage.Registry.INSTANCE);
models.add(createEmfModelByURI("persons", "models/persons.model", "http://persons", true, true));
models.add(createEmfModelByURI("houses", "models/houses.model", "http://houses", true, true));
models.add(createEmfModelByURI("personshouses", "models/personshouses.model", "personshousesexample", true, true));
Cheers,
Dimitris
|
|
| |
Goto Forum:
Current Time: Fri Apr 26 14:10:31 GMT 2024
Powered by FUDForum. Page generated in 0.05599 seconds
|