Bug 76416 Method signature using QuickFix incorrect in static methods
Very Minor bug, When using quickfix to create method in an static anonymous inner class.. then the resulting method created is not static... but it needs to be. Example: 1. Create Class: public class SwingApplication { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable(){ public void run() { createGui(); } } ); } } 2. Eclipse will give error that createGui() does not exist. 3. Use quickfix, and select 'Create method 'createGui()' in SwingApplication'. 4. Notice that the created method should be static...
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UnresolvedMethodsQuickFixTest.java
buf.append("package test1;\n");
		buf.append("public enum E {\n");
		buf.append("    CONST1, CONST2;\n");
		buf.append("    public void foo(A<String> a) {\n");
		buf.append("        a.b(1, new String[1]);\n");
		buf.append("    }\n");
		buf.append("}\n");
		String expected3= buf.toString();		
		
		assertEqualStringsIgnoreOrder(new String[] { preview1, preview2, preview3 }, new String[] { expected1, expected2, expected3 });		
	}
	
	public void testParameterMismatchSwap2() throws Exception {
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
				
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("public class E {\n");
		buf.append("    /**\n");
		buf.append("     * @param i The int value\n");
		buf.append("     * @param o The Object value\n");
		buf.append("     * @param b The boolean value\n");
		buf.append("     *                  More about the boolean value\n");
		buf.append("     */\n");
		buf.append("    public void foo(int i, Object o, boolean b) {\n");
		buf.append("        foo(false, o, i - 1);\n");
		buf.append("    }\n");
		buf.append("}\n");
		ICompilationUnit cu1= pack1.createCompilationUnit("E.java", buf.toString(), false, null);