Bug 123946 [quick assist] "Add keyword 'final' to all unchanged variables and properties"
This function can be provide with the "Format" function
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
}
	
	private void assertRefactoringResultAsExpected(CleanUpRefactoring refactoring, String[] expected) throws CoreException {
		refactoring.checkAllConditions(new NullProgressMonitor());
		CompositeChange change= (CompositeChange)refactoring.createChange(null);
		Change[] children= change.getChildren();
		String[] previews= new String[children.length]; 
		for (int i= 0; i < children.length; i++) {
			previews[i]= ((TextEditBasedChange)children[i]).getPreviewContent(null);
		}
		assertEqualStringsIgnoreOrder(previews, expected);
	}
	
	private void assertRefactoringHasNoChange(CleanUpRefactoring refactoring) throws CoreException {
		refactoring.checkAllConditions(new NullProgressMonitor());
		CompositeChange change= (CompositeChange)refactoring.createChange(null);
		Change[] children= change.getChildren();
		StringBuffer buf= new StringBuffer();
		buf.append("Refactoring should generate no changes but does change:\n");
		for (int i= 0; i < children.length; i++) {
			buf.append(((TextChange)children[i]).getPreviewContent(null));
		}
		
		assertTrue(buf.toString(), change.getChildren().length == 0);
	}
	
	public void testAddNLSTag01() throws Exception {
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package test1;\n");