Community
Participate
Working Groups
Build Identifier: M20100909-0800 The autocomplete functionality gets confused in the case of classes with names ending with '$' (e.g. 'AClass$' ). Such classes, with names ending in '$', are frequent when interacting with code written in the Scala programing language. Below is an example of this issue. --- package pack1; class AClass$ { public static int M; } -- package another_pack; class Foo { void a () { AClass$.| //cursor } } ---- When selecting at the cursor the autocompletion for 'M', a bad import and autocompletion is generated: --- package another_pack; import test.a.AClass.; //PROBLEM class Foo { void a() { .M //PROBLEM } } --- Reproducible: Always Steps to Reproduce: 1. Create class 'AClass$', in package 'pack1' 2. Add a static attribute 'M' to this class. 3. Create class 'Foo' in package 'another_pack' 4. Create a method 'a()' in class Foo 5. Inside this method try to access the member 'M' of class 'AClass$' by using the autocomplete feature. This gives, as presented above, erroneous results.
(In reply to comment #0) Reproduced with I20100928-0800. Note that for this to happen, the class AClass$ should be declared public. Also, this doesnt happen when an import statement for AClass$ has already been added. In the content assist proposal list, I can see that the resolved type for M is showing as "AClass." So might be a problem in resolution here. Will investigate.
Looks like there quite a few votes on this one. This is marked for 3.7. But, Wondering if there is a chance this can make it into 4.2 juno simultaneous release.
(In reply to comment #2) > Looks like there quite a few votes on this one. This is marked for 3.7. But, > Wondering if there is a chance this can make it into 4.2 juno simultaneous > release. This was found in 3.7, the target is still not set. This will not make it into 4.2 as we are into RC where only stop ship issues are fixed.
Created attachment 221124 [details] Patch to leave '$' at end of class name in resolved signature during completion Will also attach patch with a few test cases.
Created attachment 221125 [details] Test patch to leave '$' at end of class name in resolved signature during completion New test class and input, separate from full CompletionTests.java for ease of review.
New Gerrit change created: https://git.eclipse.org/r/101392
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.