Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia-newbie]: Compile errors in generated code?
[Eugenia-newbie]: Compile errors in generated code? [message #1293847] Sat, 12 April 2014 21:06 Go to next message
Scott Finnie is currently offline Scott Finnie
Messages: 76
Registered: October 2011
Member
Trying to build my first editor with eugenia and running into problems. Specifically: there are compile errors in the generated code.

Would appreciate any help. So far I have:

1. Installed Epsilon ( Eugenia 1.1.0.201309101707 org.eclipse.epsilon.eugenia.feature.feature.group Eclipse.org)
2. Created new project, added new emfatic file for model. Contents below.
3. Right-clicked & selected Eugenia->Generate GMF Editor
4. Everything seemed OK - no errors - so launched runtime eclipse. However: there was no option to create a diagram for my model, only a model using the standard emf tree editor
5. Had a look again and realised I hadn't noticed the GMF 'code gen complete' dialogue. Had a root about and realised GMF wasn't installed - so installed it.
6. Re-ran Eugenia->Generate GMF editor. Now generates all the source & I get the confirmation dialogue - says successful.
7. Tried to launch runtime instance. However fails due to compilation errors in the generated source; specifically:
- *.diagram.part/DiagramUpdater.java
- *.diagram.edit.policies/*TextNonResizableEditPolicy.java
- *.diagram.edit.policies/*TextSelectionEditPolicy.java

Thanks for any pointers.

-S.
--
.emf file contents as follows:
@gmf.diagram(foo="bar")
class Domain {
	attr String name;
	val ModelElement[*] elements;
}

abstract class ModelElement {
	attr String name;
}

@gmf.node(label = "name", figure = "rectangle")
class FClass extends ModelElement {
	//val Property[*] properties;
}

@gmf.node(	label = "name", 
			figure = "ellipse", 
			size = "10,10",
			label.placement="external")
class GenSpec extends ModelElement {
	@gmf.link(target.decoration="closedarrow")
	ref FClass supertype;
	@gmf.link(target.decoration="none")
	ref FClass[*] subtypes;
}

Re: [Eugenia-newbie]: Compile errors in generated code? [message #1294896 is a reply to message #1293847] Sun, 13 April 2014 18:26 Go to previous message
Scott Finnie is currently offline Scott Finnie
Messages: 76
Registered: October 2011
Member
Found it. I had originally used 'Class' instead of 'FClass' & didn't realise the generated directories weren't cleaned automatically. There was a name clash I think as deleting the generated projects & re-generating fixed the problem.
Previous Topic:Deep copy of model element
Next Topic:containsKey not found?
Goto Forum:
  


Current Time: Sat Aug 23 09:23:56 EDT 2014

Powered by FUDForum. Page generated in 0.01727 seconds