Bug 141504

Summary: [quick fix] Change access to static using declaring class is a no-op
Product: [Eclipse Project] JDT Reporter: Benno Baumgartner <benno.baumgartner>
Component: CoreAssignee: Martin Aeschlimann <martinae>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.3 M7   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Benno Baumgartner CLA 2006-05-12 05:03:48 EDT
I20060512-0010

Given:
public class K1 {
	static class ClassB {
		public static ClassC C;
	}
	static class ClassA {
		public static ClassB B;
	}
	static class ClassC {}
	public void foo() {
		ClassA.B.C.toString();
	}
}
With compiler option 'Non static access to static member' set to warning

1. On the warning in 'ClassA.B' Ctrl-1
2. Select 'Change access to static using ClassA'
Is:
  Nothing happens

This is not a regression to 3.1.2, the same bug there. May be the cause for Bug 140565.
Comment 1 Benno Baumgartner CLA 2006-05-12 05:37:19 EDT
This meight be a core issue: Change field C to a method C() and the warning is shown on C() and not on B anymore and the quick fix works as expected.
Comment 2 Benno Baumgartner CLA 2006-07-03 06:20:10 EDT
Don't forget to adapt org.eclipse.jdt.ui.tests.quickfix.CleanUpTest.testCodeStyle_Bug140565() when fixing this bug.
Comment 3 Olivier Thomann CLA 2007-03-28 10:05:36 EDT

*** This bug has been marked as a duplicate of bug 179056 ***
Comment 4 Maxime Daniel CLA 2007-04-27 08:59:10 EDT
Verified for 3.3 M7 using build I20070427-0010.