For the case:
- An EClass containing an attribute
foo
- An Aspect over this class declaring
foo with a default value
Can we consider the aspect has the priority?
It is breaking a test case in Melange. We load a model of merged Ecore + Aspect and try to access the attribute declared in the Aspect but we access the null value of the model.
|
val gemocHackGetter = ''' |
|
try { |
|
for (java.lang.reflect.Method m : _self.getClass().getMethods()) { |
|
if (m.getName().equals("«IF f.type.simpleName == "boolean" || f.type.simpleName == "Boolean"»is«ELSE»get«ENDIF»«f.simpleName.substring(0,1).toUpperCase() + f.simpleName.substring(1)»") && |
|
m.getParameterTypes().length == 0) { |
|
Object ret = m.invoke(_self); |
|
if (ret != null) { |
|
return («f.type.type.qualifiedName») ret; |
|
}«IF !f.type.primitive» else { |
|
return null; |
|
} |
|
«ENDIF» |
|
} |
|
} |
|
} catch (Exception e) { |
|
// Chut ! |
|
} |
|
return «PROP_VAR_NAME».«f.simpleName»; |
For the case:
foofoowith a default valueCan we consider the aspect has the priority?
It is breaking a test case in Melange. We load a model of merged Ecore + Aspect and try to access the attribute declared in the Aspect but we access the null value of the model.
k3/k3.eclipse/fr.inria.diverse.k3.al.annotationprocessor.plugin/src/fr/inria/diverse/k3/al/annotationprocessor/Aspect.xtend
Lines 800 to 817 in 5c35a83