| Summary: | [Check] Checks for Generic EMF Form Editor using Xtend in combination with Java method | ||
|---|---|---|---|
| Product: | [Modeling] M2T | Reporter: | Gerd <kainz> |
| Component: | Xpand | Assignee: | Dennis Huebner <dennis.huebner> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | barner, dennis.huebner, kainz, m2t.xpand-inbox |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Gerd
The same problem exists with ItemLabelProvider.ext where implementing label() as static Java method does not work correctly, either. The steps to reproduce are equivalent to the case described above (provide a Java implementation for label(), e.g. adapting the STR from #322902). Digging a bit into the code I could figure out that in that case loading the Java class providing the static method fails: In org.eclipse.internal.xtend.xtend.ast.JavaExtensionStatement.evaluateInternal(), getJavaMethod() yields null. I suspect that this is due to the ExecutionContext object, but I am no expert of xtend. I verified that this code path is taken for both Checks.chk as well as ItemLabelProvider.ext. I could successfully run the same Java method from an xtend script via a MWE workflow, but here the stack is quite different and org.eclipse.xtend.expression.ExpressionFacade seems to do the right thing (or is provided with a correct execution context). Any thoughts or hints who to debug this further? Won't work with Java extensions. |