Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Error in import models in same project
Error in import models in same project [message #1748257] Mon, 21 November 2016 15:43 Go to next message
Marcelo Rodrigues is currently offline Marcelo RodriguesFriend
Messages: 21
Registered: November 2016
Junior Member
I'm getting the following error in the PersonsHouses.emf file: Failed to load import model "Houses" and Failed to load import model "Persons" (Which are files that are in the same project). I've already looked for possible solutions on the internet and EpsilonBook but I could not find the solution.


_____________ Houses.emf____________________
package Houses;

class HouseGroup{
val House[*] houses;
}

class House{
attr String address;
}





_____________ Persons.emf____________________
package Persons;

class PersonGroup{
val Person[*] person;
}

class Person{
attr String name;
}






_____________ PersonsHouses.emf____________________

package PersonHouseRelationship;

import "Houses";
import "Persons";

class PersonHouseRelationshipGroup{
val PersonHouseRelationship[*] personHouseRelationships;
}

@exeed(label = "return self.person.name + ' ' + self.type + ' ' + self.adress; ")
class PersonHouseRelationship{
ref Persons.Person person;
ref Houses.House house;
attr PersonHouseRelationshipType type;
}

enum PersonHouseRelationshipType {
Owns;
Lets;
}
Re: Error in import models in same project [message #1748259 is a reply to message #1748257] Mon, 21 November 2016 15:57 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Marcelo,

You need to convert Houses.emf and Persons.emf to their Ecore equivalents (right click on them in the Project Explorer and select "Generate Ecore") and then register the two new .ecore files (right click on them and select "Register EPackages"). If you then refresh your PersonHouses.emf editor, the errors should disappear.

Cheers,
Dimitris
Re: Error in import models in same project [message #1748264 is a reply to message #1748259] Mon, 21 November 2016 16:04 Go to previous messageGo to next message
Marcelo Rodrigues is currently offline Marcelo RodriguesFriend
Messages: 21
Registered: November 2016
Junior Member
I've already followed these steps (as in this tutorial: https://www.youtube.com/watch?v=nhYwJ0iEu-E) but still it's still giving an error.
Re: Error in import models in same project [message #1748265 is a reply to message #1748264] Mon, 21 November 2016 16:08 Go to previous messageGo to next message
Marcelo Rodrigues is currently offline Marcelo RodriguesFriend
Messages: 21
Registered: November 2016
Junior Member
Take a look at this print of my project: https://drive.google.com/file/d/0B-VOehfmRw4dOVN2QjdlbXB6TVE/view?usp=sharing
Re: Error in import models in same project [message #1748271 is a reply to message #1748265] Mon, 21 November 2016 16:57 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
Senior Member

Hi Marcelo,

You're right. I've added "http://" to the namespace URIs of the involved metamodels (to ensure that they are not treated as relative paths) and it all seems to be working as expected now [1].

Cheers,
Dimitris

[1] https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/examples/org.eclipse.epsilon.examples.modelink.personshouses
Previous Topic:Using EWL or EOL
Next Topic:Where is the "Model" class come from in example "Modify a Tree model with EOL"
Goto Forum:
  


Current Time: Tue Apr 16 20:32:25 GMT 2024

Powered by FUDForum. Page generated in 1.04695 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top