Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Emfatic] Error while importing ecore
[Emfatic] Error while importing ecore [message #1066694] Wed, 03 July 2013 19:19 Go to next message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
Hi,

I tried to import an ecore from another project to an emf file, but still get an error "Failed to resolve type: PL". Here are both emf files:

pld.emf:

@namespace(
	uri="/org.model.variability/model/pld.ecore",
	prefix="")

package pld;

@gmf.diagram(onefile="true", diagram.extension="pld", model.extension="pld")
class PL{

  	unsettable attr EString name = "PL";
}


and hw.emf, located in another project:

@namespace(
	uri="/org.model.variability.hw/model/hw.ecore",
	prefix="")

package hw;

import "platform:/resource/org.model.variability/model/pld.ecore";

@gmf.node(label="name", label.icon="false", color="238,233,233", border.color="0,0,0", resizable="false")
class Platform{
  	unsettable attr EString name = "Platform";	
  	
  	ref PL pl;
}


Am I doing something wrong with my import?

Cheers,
Phil
Re: [Emfatic] Error while importing ecore [message #1066769 is a reply to message #1066694] Thu, 04 July 2013 10:01 Go to previous messageGo to next message
Phil H is currently offline Phil HFriend
Messages: 267
Registered: November 2012
Senior Member
Ok, it seems that the missing package name in front of the class is causing this. So using ref pld.PL pl; is accepted.

But when I try to generate an GMF editor with Eugenia, I get a NPE:

java.lang.NullPointerException
	at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.handle(GenPackageImpl.java:2417)
	at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl$DependencyHelper.<init>(GenPackageImpl.java:2325)
	at org.eclipse.emf.codegen.ecore.genmodel.impl.GenPackageImpl.prepareCache(GenPackageImpl.java:3139)
	at org.eclipse.emf.codegen.ecore.genmodel.generator.GenPackageGeneratorAdapter.doPreGenerate(GenPackageGeneratorAdapter.java:177)
	at org.eclipse.emf.codegen.ecore.generator.AbstractGeneratorAdapter.preGenerate(AbstractGeneratorAdapter.java:250)
	at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:640)
	at org.eclipse.emf.codegen.ecore.generator.Generator.generate(Generator.java:559)
	at org.eclipse.epsilon.eugenia.GenerateEmfCodeDelegate.runImpl(GenerateEmfCodeDelegate.java:43)
	at org.eclipse.epsilon.eugenia.GenerateAllDelegate.generateEMFCode(GenerateAllDelegate.java:227)
	at org.eclipse.epsilon.eugenia.GenerateAllDelegate.runImpl(GenerateAllDelegate.java:121)
	at org.eclipse.epsilon.eugenia.GenerateAllDelegate$1.run(GenerateAllDelegate.java:59)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Re: [Emfatic] Error while importing ecore [message #1066771 is a reply to message #1066769] Thu, 04 July 2013 10:14 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 911
Registered: July 2009
Senior Member
Hi Phil,

As discussed in [1], currently Eugenia only works with self-contained single-package metamodels.

Cheers,
Dimitris

[1] http://www.eclipse.org/forums/index.php/mv/msg/489879/1066770/#msg_1066770
Re: [Emfatic] Error while importing ecore [message #1472257 is a reply to message #1066771] Thu, 13 November 2014 18:36 Go to previous messageGo to next message
Phil Hei is currently offline Phil HeiFriend
Messages: 2
Registered: November 2014
Junior Member
Is there any support of metamodels that span across several files for the future planed?
Re: [Emfatic] Error while importing ecore [message #1473159 is a reply to message #1472257] Fri, 14 November 2014 11:35 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 911
Registered: July 2009
Senior Member
Hi Phil,

I'm afraid there are no concrete plans for such an extension.

Cheers,
Dimitris
Previous Topic:Epsilon getAllChildren or getAllContents for EMF based models
Next Topic:Importing a Transformation trace from an etl-module into an eml-module
Goto Forum:
  


Current Time: Sun Nov 23 12:28:19 GMT 2014

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

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