| Summary: | [ContentAssist] Unexpected proposals | ||
|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Sebastian Zarnekow <sebastian.zarnekow> |
| Component: | Core | Assignee: | Project Inbox <xtend-inbox> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | btickets, Holger.Schill, moritz.eysholdt, st.oehme, sven.efftinge |
| Version: | 2.3.0 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | v2.7 | ||
| Bug Depends on: | |||
| Bug Blocks: | 409580 | ||
For the second scenario there is a context computed where the currentModel is a XtendClass - that causes the override stuff. org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.StatefulFactory.computeCurrentModel(EObject, INode, Collection<AbstractElement>) Pushed to review |
Input file: class X { def method() { val CharSequence c = null c.toString // first expectString(c.toString) // second if (true) { expectString(c.toString) // third } } def expectString(String s) {} } Invoke CA in annotated lines right after c.toString First example works as expected Second yields 'Override Object.toString()' which is not right Third offers Object.toString() in addition to CharSequence.toString which is not what one would expect (assumed receiver seems to be 'this' since X.toString is suggested if toString is specialized in X