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

Bug 125622

Summary: [type wizards] New -> Class -> Superclass content assist not working 100%
Product: [Eclipse Project] JDT Reporter: Darryl Miles <darryl>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: sakai.takafumi
Version: 3.1.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

Description Darryl Miles CLA 2006-01-28 11:53:24 EST
When I use Ctrl+Space content assist in the "Superclass" field of the "New Class" wizard, I see the available Content Assist classes.  But when I highlight the one I want to use and press return, it does not auto-complete the wizard.

I typed in: "java.lang.Excep"

Then used content-assist to find "java.lang.Exception" but had to type in the "tion" when I expected it to auto-complete from my selection when I pressed return.
Comment 1 Takafumi Sakai CLA 2006-03-20 01:50:45 EST
I think this bug is caused by following processing.

org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal
line: 498

In the validate method
boolean validated= startsWith(document, offset, fDisplayString);

"fDisplayString" is like "Object - java.lang". So, starsWith method can't decide if it is the same class correctly. statsWith method compare only input string of "super class name" field with the fragment of "fDisplayString" which is the same length with super class name.

I suggest using full specified class name instead of "fDisplayString" if validated field is false.(ex. java.lang.Object)

For example:
boolean validated= startsWith(document, offset, fDisplayString);
if (!validated) {
  validated= startsWith(document, offset, "full specified name");
}
Comment 2 Eclipse Genie CLA 2019-08-02 20:10:59 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.

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.