Xtend -> Java transformation bug? (scoping of type names) [message #804230] |
Wed, 22 February 2012 05:53  |
Eclipse User |
|
|
|
Hi!
I'm writing validation of a XText DSL in XTend. Transformation to Java is done automatically. Since there is no "generateStub" for validation.JavaValidatorFragment I had to plugin the XTend class in between, e.g. instead of
MyDSLValidator extends AbstractMyDSLJavaValidator
I use
MyDSLJavaValidator extends MyDSLXTendValidator
MyDSLXTendValidator extends AbstractMyDSLJavaValidator
The MyDSLXTendValidator.xtend is automatically transformed to xtend-gen/MyDSLXTendValidator.java.
Now I have a XTend expression in the validator of kind
eObject.feature.map(o|o.states)
where states is of type org.xtext.example.mydsl.mydsl.State
The transformation to java:
public EList<State> apply(final StateDefinitions o) {
EList<State> _states = o.getStates();
return _states;
}
where the class State is automatically determined to be of type org.eclipse.xtext.validation.AbstractDeclarativeValidator.State
I tried to cast in XTend manually, but that didn't help. Is it a transformation bug or do I have to do something completely different (disregarding renaming of the "State" type in my DSL)?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03315 seconds