Community
Participate
Working Groups
I'm trying to complete: `Instant.now().compareTo(|)` at | location EXPECTED: when cycling to chain completion, some chain proposals eg `Instant.now()` GOT: No chain proposal However, if I try to complete `Instant t = |`, then I do get the chain proposals.
I suspect what's happening here from when I debugged in ChainCompletionProposalComputer is that the completion context doesn't know the return type when there is no token between the brackets (eg '(|) ). The moment a token exist, chain completion will attempt to look up possible candidates. The AST parsing might treat it as a no-arg method, which might point to this being a jdt.core issue. Will have to investigate further.
this would probably also solve bug 207483?
(In reply to Roland Grunberg from comment #1) > The AST parsing might treat it as a no-arg method, which might point to this > being a jdt.core issue. Will have to investigate further. Did you have the opportunity to look at it? Can this be captured by some unit test (eg get the AST for a class and verify the method binds to correct candidates in AST or whatever?
@Gayan: Wasn't it partly addressed recently? I seem to recall a related change, but I tried locally and this particular case is not fixed.
(In reply to Mickael Istria from comment #4) > @Gayan: Wasn't it partly addressed recently? I seem to recall a related > change, but I tried locally and this particular case is not fixed. The argument types are not provided in the completion context. But we need to debug why chain completions is not suggesting static method from the class.
@Gayan , Would you be able to have a look.
@Kalyan sure i can have a look in next week
Related discussion: https://github.com/eclipse-jdt/eclipse.jdt.core/discussions/780