Home » Modeling » Epsilon » Error in importing Epsilon project example
|Re: Error in importing Epsilon project example [message #1776640 is a reply to message #1776030]
||Sun, 19 November 2017 19:55
| Marcelo Rodrigues
Registered: November 2016
I am reopening this topic because now I am facing another type of problem, however, in the same project .
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 . This project  where I took the models (and metamodels), is an example of how to use the ModeLink  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 . I had no difficulty running the project  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.
[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
| Dimitris Kolovos
Registered: July 2009
Location: York, UK
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.
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));
Current Time: Wed Nov 14 07:05:53 GMT 2018
Powered by FUDForum
. Page generated in 0.02506 seconds