Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 127749

Summary: [assist] Invalid type proposal when type name contains $ character(s)
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, eckart.langhuth, marion.schmid, stephan.herrmann, vikciukas
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Bug Depends on:    
Bug Blocks: 145598    
Attachments:
Description Flags
code assist with class containing $ in the middle none

Description Frederic Fusier CLA 2006-02-14 11:07:05 EST
Follow-up of bug 125301 comment 0 point 1.

Proposal inside simple test case:
class A$B {}
class Test {
  A|
}
Then you get a "B - A" completion proposal instead of expected "A$B" expected one.
Comment 1 Marion Schmid CLA 2006-05-29 10:46:59 EDT
Created attachment 42865 [details]
code assist with class containing $ in the middle

Hello, additionally, I found out, that JDT code assist assumes inner class instead of separate class. Please see attachment. I tested this with Eclipse3.2RC6 and created two java files:

public class Test$One {
}

public class Test$two {
	public static String test(T<--call code assist for Test$One){
		return "test";
	}
}

Best regards, 
Marion
Comment 2 Marion Schmid CLA 2006-05-29 11:06:03 EDT
Comment on attachment 42865 [details]
code assist with class containing $ in the middle

Sorry, meant following case, I mixed my screenshots. To describe what I meant: class name starts with $, e.g. public class $TestOne {}. In this case, the code assist assumes that TestOne is an inner class of a class with empty name "".
Comment 3 David Audel CLA 2008-05-20 05:24:07 EDT
*** Bug 128966 has been marked as a duplicate of this bug. ***
Comment 4 Stephan Herrmann CLA 2011-06-28 13:14:50 EDT
After trying this in Indigo I'd like to add:
- the text inserted into the editor is actually correct
- only the display name used in the UI is wrong.
So maybe it's actually possible to fix this after all? :)
Comment 5 Stephan Herrmann CLA 2011-06-28 13:19:36 EDT
*** Bug 145598 has been marked as a duplicate of this bug. ***
Comment 6 Ayushman Jain CLA 2011-06-28 14:17:45 EDT
We anyway need to handle $ properly everywhere in JDT. Right now its used only as a delimiter for inner classes.
Comment 7 Eclipse Genie CLA 2020-05-04 02:27:12 EDT
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.