Community
Participate
Working Groups
When I hit ctrl space on the following code: ArrayList arrayList = new ArrayList(); int key = 0; Object value; arrayList.add( I get a list of methods, in this case I get add(int index, object element) and add(object element) If I select the first method, and hit return, it fills in the following code add(index, element) as opposed to add(key, value)
You have to enable Preference->Java->Editor->Code Assist-> Fill argument names and 'Guess filled argument types' However there is a bug: It only works when you complete at arrayList.add but not with arrayList.add( Moving to JDT.text
"Unassign" PRs because of changes in staffing
Adapting summary (see comment 1).
*** Bug 89515 has been marked as a duplicate of this bug. ***
*** Bug 58720 has been marked as a duplicate of this bug. ***
*** Bug 98448 has been marked as a duplicate of this bug. ***
Has to be shifted to 3.3.
*** Bug 85903 has been marked as a duplicate of this bug. ***
Content assist should not only propose guesses for arrayList.add(| but also for later method arguments like here: arrayList.add(0, |)
*** Bug 222301 has been marked as a duplicate of this bug. ***
No time for this. Sorry.
*** Bug 370678 has been marked as a duplicate of this bug. ***
Created attachment 210572 [details] minimal modifications to propose methods for CompletionOnMessageSend completion request I've attached a minimal patch to make method call completions on messageSend completion nodes work in certain completion contexts. I'm yet not familiar with the code but at least I *think* I've found the right location for this kind change. Some notes/questions: * List of overloaded methods is not displayed on top. This behavior is still wanted? * Methods returning void are proposed. Should they be filtered? * Should return types be considered for ranking? * How about primitives if reference types are expected? Filter? * Patch is not checked for any side-effects. It's a quick test to see where to look for a solution :)
(In reply to comment #13) > Created attachment 210572 [details] > minimal modifications to propose methods for CompletionOnMessageSend > completion request The patch does not work for me. I used: void doIt(int i) { int a; int b; doIt(<Ctrl+Space>) } ==> no proposals I would expect the same list I get after void doIt(int i) { int a; int b; doIt<Ctrl+Space> }
Created attachment 210637 [details] Updated. public class Test01 { void oneArg(int i) { int a; int b; oneArg(<^space>); } void twoArgs(int i) { int a; int b; twoArg(a, <^space>); } } offers onearg(), twoarg(), wait(), hashcode(), clone() etc. (still no variables)
It's still not working properly. But before I'm going to implement the details, can ask for comments on the above questions?
(In reply to comment #16) > It's still not working properly. But before I'm going to implement the details, > can ask for comments on the above questions? I thought I already did ;-). The only proposals I'd expect to appear are those (argument guesses and parameter name) which come when completing the method.
(In reply to comment #17) > (In reply to comment #16) > > It's still not working properly. But before I'm going to implement the details, > > can ask for comments on the above questions? > > I thought I already did ;-). > > The only proposals I'd expect to appear are those (argument guesses and > parameter name) which come when completing the method. i.e. we don't start to provide "normal" proposal when there's no prefix.
*** Bug 426855 has been marked as a duplicate of this bug. ***
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.