Jan Koehnlein Messages: 746 Registered: July 2009 Location: Hamburg
Use an imported Ecore model instead of a generated one (see docs)
This is the standard procedure if Xtext's Ecore model inferrence doesn't
do exactly what you like.
Am 10.06.13 14:13, schrieb Thomas Hergenröder:
> I have ParserRule like this:
> Binding | Event | ViewType | KeyValue
> they all have in common that they have a name attribute which translates
> to String.
> The same attribute which is used for the qualified name.
> Is there a way to enforce that?
> And also ensure that the real JavaInterface allways contains the method:
> String getName()
> (and "void setName(String value)" - but I only use that for junit-Tests)
It is allmost what I want - it just does not give me a compile error, when there is no name attribute that result in a java-String.
(although I think it would complain if the name attribute is a cross-reference).
It simply addes get/setName(String).