Bug 141504 - [quick fix] Change access to static using declaring class is a no-op
Summary: [quick fix] Change access to static using declaring class is a no-op
Status: VERIFIED DUPLICATE of bug 179056
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-12 05:03 EDT by Benno Baumgartner CLA
Modified: 2007-04-27 08:59 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.