Bug 475444

Summary: static import of members should work if the member is defined in a super class
Product: [Eclipse Project] JDT Reporter: Christian Schwarz <chriss.dev>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 4.6   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=576571
Whiteboard:

Description Christian Schwarz CLA 2015-08-20 02:59:03 EDT
Currently it is not possible to make a static import if a static member is defined in a super class.

Here is a real world example:


class org.mockito.Matchers {
 public static String anyString(){..}
}

class org.mockito.Mockito extends org.mockito.Matchers {
}


It is not possible to do a static import of Mockito.anyString(), it is only possible if the declaring type of #anyString() is referenced -> Matchers.anyString().