Bug 129165 [quick fix] 'Change modifier to final' changes order of variable decl fragments
I20060221-1300 Given: int i= 1, j= i + 1, h= j + 1; Serializable ser= new Serializable() { void foo() { System.out.println(j); } }; Then make j final with quick fix 'Change modifier of 'j' to final' Result: int i= 1, h= j + 1; final int j= i + 1; Serializable ser= new Serializable() { void foo() { System.out.println(j); } }; Expected: int i= 1; final int j= i + 1; int h= j + 1; Serializable ser= new Serializable() { void foo() { System.out.println(j); } }; The order of the declarations must be preserved.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/ModifierCorrectionsQuickFixTest.java
private IPackageFragmentRoot fSourceFolder;
	private static final boolean BUG_84358= true;
	public ModifierCorrectionsQuickFixTest(String name) {
		super(name);
	}
	public static Test allTests() {
		return setUpTest(new TestSuite(THIS));
	}
	
	public static Test setUpTest(Test test) {
		return new ProjectTestSetup(test);
	}
	
	public static Test suite() {
		return allTests();
	}
	protected void setUp() throws Exception {
		Hashtable options= TestOptions.getDefaultOptions();
		options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.SPACE);
		options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, "4");
		options.put(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER, JavaCore.ERROR);
		
		JavaCore.setOptions(options);			
		IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
		store.setValue(PreferenceConstants.CODEGEN_ADD_COMMENTS, false);
		
		fJProject1= ProjectTestSetup.getProject();
		fSourceFolder= JavaProjectHelper.addSourceContainer(fJProject1, "src");
	}
	protected void tearDown() throws Exception {