Community
Participate
Working Groups
Created attachment 285078 [details] Situation where an existing parameter is overwritten There are situations where an existing parameter is overwritten by the "completion overwrites" feature (which is a really great, game-changing feature for me :-) ). Consider: public class CompletionOverrides { public static void main(String[] args) { int arg1 = 1; int arg2 = 2; foo(arg1, arg2); } enum MyEnum { A, B } static void foo(int arg1, int arg2) {} } 1) I change the method signature of foo to static void foo(MyEnum arg0, int arg1, int arg2) {} 2) I start fixing the existing call to foo. I put the cursor right after the opening parenthesis: public static void main(String[] args) { int arg1 = 1; int arg2 = 2; foo( arg1, arg2); | cursor location } I start typing "MyEnum." and now the autocomplete allows me to choose between one of the enum values. But "arg1" is marked in yellow, so when I choose an enum value "arg1" is overwritten and I get: public static void main(String[] args) { int arg1 = 1; int arg2 = 2; foo(MyEnum.A, arg2); } I also added a photo of the situation. I guess it is not easy to detect if a user wants to overwrite an existing value or to add a new value, but at least in my workflow this seems to happen sometimes.
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. If you have further information on the current state of the bug, please add it. 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.