| Summary: | [xtend2] problem with java method overloading + extension methods | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Moritz Eysholdt <moritz.eysholdt> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED WORKSFORME | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sebastian.zarnekow |
| Version: | unspecified | Flags: | sebastian.zarnekow:
indigo+
|
| Target Milestone: | M7 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
Is the binding wrong (e.g. the generated code is wrong) or is it the hyperlinking, that does not work? the hyperlinking leads me to the wrong method. So I assumed the binding is wrong. Some more playing around shows that the java-method getGrammarConstraints is only made available as "grammarConstraints" if it only has one parameter. If it has two parameters, only "getGrammarConstraints" is visible. grammar.getGrammarConstraints(clazz) binds as expected to getGrammarConstraints(Grammar, EClass) A short offline discussion revealed a usability problem with respect to the content proposals in Xtend. The linking and navigation is correct. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
with java class ------- public static Map<IConstraint, List<EObject>> getGrammarConstraints(Grammar grammar, EClass clazz) {...} public static Collection<IConstraint> getGrammarConstraints(Grammar grammar) {...} ------- the xtend2 code ------- grammar.grammarConstraints(clazz) ------- erroneously binds to getGrammarConstraints(Grammar). It should link to getGrammarConstraints(Grammar, EClass). the java class is made visible via "import static extension"