| Summary: | [assist] Autocompletion on base keyword within static callin missing | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Objectteams | Reporter: | Jan Marc Hoffmann <exelnet> | ||||
| Component: | OTDT | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | ||||||
| Version: | 0.7.1 | ||||||
| Target Milestone: | 0.8 M4 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 184553 [details]
test & fix
I could reproduce by combining two factors:
- methods are static
- base call is used as a statement (ignoring the result)
New test is ...otdt...CodeCompletionTest.testCompleteBasecall2()
The bug happened because CompletionOnMemberAccess.resolveType(..)
could not resolve the receiver ('base').
Fixed by better resolving of a base reference in a static context.
Fix was committed as r1127 f. Verified for M4 using build 201012150343 |
If a static callin is used, the usual autocompletion on base isn't working. public team class SelectionAdapter { @SuppressWarnings("restriction") protected class GOTWordFinder playedBy JavaWordFinder { IRegion findWord(IDocument document, int offset) <- replace IRegion findWord(IDocument document, int offset); static callin IRegion findWord(IDocument document, int offset) { base. // <-- findWord should be available here. return null; } } } greetings Jan Marc