Bug 19892 - [content assist] Code completion offers same choice twice.
Summary: [content assist] Code completion offers same choice twice.
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 289976 295229 (view as bug list)
Depends on: 124280
Blocks:
  Show dependency tree
 
Reported: 2002-06-11 09:01 EDT by Andreas Krüger CLA
Modified: 2020-03-20 15:19 EDT (History)
4 users (show)

See Also:


Attachments
Context is a static method in a class that's badly indented. (8.61 KB, image/png)
2002-06-11 09:04 EDT, Andreas Krüger CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Krüger CLA 2002-06-11 09:01:58 EDT
I'll insert a screen shot that gives you the details.
Comment 1 Andreas Krüger CLA 2002-06-11 09:04:22 EDT
Created attachment 1351 [details]
Context is a static method in a class that's badly indented.
Comment 2 Erich Gamma CLA 2002-06-11 12:09:33 EDT
moving to JDT CORE
Comment 3 Philipe Mulet CLA 2002-06-11 12:18:54 EDT
Filtering with enclosing types is guilty.

class X {
   void bar(){
	new Object(){
		void foo(){
			getClas<CODE ASSIST>
		}
	}
   }
}
Comment 4 Philipe Mulet CLA 2002-06-11 12:38:09 EDT
Actually, the code assist infrastructure effectively find 2 legite matches, but 
the UI doesn't present the difference.

First match would be 'this.getClass()' --> X$1.class
Second match would be 'X.this.getClass()' --> X.class

The second match completion name would cause insertion of qualified X.this.

Back to JDT/UI.
Comment 5 Dirk Baeumer CLA 2002-06-12 09:13:40 EDT
Candidate fpor F4
Comment 6 Erich Gamma CLA 2002-06-15 05:24:14 EDT
defer
Comment 7 Dirk Baeumer CLA 2002-07-17 11:38:28 EDT
A solution would be to show

getClass() for this.getClass()
X.this.getClass() for X.this.getClass()

Comment 8 Dirk Baeumer CLA 2002-07-24 06:45:47 EDT
Reopening for 2.1 consideration
Comment 9 Dani Megert CLA 2003-07-15 09:40:02 EDT
Still an issue in 3.0 M2
Comment 10 Dani Megert CLA 2006-05-12 06:02:38 EDT
Removing the 'readme' keyword: this is to minor to put it into the README.
Comment 11 Dani Megert CLA 2009-05-04 03:36:20 EDT
Still an issue in 3.5 M7.
Comment 12 Dani Megert CLA 2009-09-21 06:38:32 EDT
*** Bug 289976 has been marked as a duplicate of this bug. ***
Comment 13 Dani Megert CLA 2009-11-17 06:29:48 EST
*** Bug 295229 has been marked as a duplicate of this bug. ***
Comment 14 Eclipse Genie CLA 2020-03-20 15:19:56 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.