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

Bug 127440

Summary: [select] No selection in static import field
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: David Audel <david_audel>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Philipe Mulet CLA 2006-02-13 04:46:13 EST
jdtcore v_635

On following example with 2 units:

X.java================================
import static p.A.CONSTANT_B; 
public class X {
}

p/A.java==============================
package p;
public class A extends B implements I {}
interface I { int CONSTANT_I = 1; }
class B { int CONSTANT_B = 1; }

Pressing F3 on CONSTANT_B in X's static import rings the bell and doesn't select the matching field.
Comment 1 Philipe Mulet CLA 2006-02-13 04:55:14 EST
Reproduced with HEAD fom 20060213
Comment 2 David Audel CLA 2006-03-29 06:30:10 EST
CONSTANT_B should be static to reproduce the problem.

p/A.java==============================
package p;
public class A extends B implements I {}
interface I { int CONSTANT_I = 1; }
class B { static int CONSTANT_B = 1; }
Comment 3 Philipe Mulet CLA 2006-03-29 09:11:14 EST
Maybe even if not static, we could be resilient and still find the field as the closestMatch.
Comment 4 Eclipse Genie CLA 2019-09-22 12:38:43 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.