Bug 40342 quickfix from anonymous class creates wrong visibility method
------------------B.java-------------- package b; public class B { } -------------------------------------- ------------------A.java-------------- package a; import b.B; public class A { void method() { I i = new I() { public void method() { B.quickFixMethod(); //<-- use quickfix here } }; } } interface I { void method(); } ----------------------------------------- if you use quickfix to create the missing method quickfix produces: protected static void quickFixMethod() which is not visible from A.java it should be public!
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UnresolvedMethodsQuickFixTest.java
buf.append("package test1;\n");
		buf.append("import java.util.Vector;\n");
		buf.append("import java.util.Collection;\n");
		buf.append("import java.io.Serializable;\n");
		buf.append("public class E {\n");
		buf.append("    boolean bool;\n");
		buf.append("    char c;\n");
		buf.append("    byte b;\n");
		buf.append("    short s;\n");
		buf.append("    int i;\n");
		buf.append("    long l;\n");
		buf.append("    float f;\n");
		buf.append("    double d;\n");
		buf.append("    Object object;\n");
		buf.append("    Vector vector;\n");
		buf.append("    Cloneable cloneable;\n");
		buf.append("    Collection collection;\n");
		buf.append("    Serializable serializable;\n");
		buf.append("    Object[] objectArr;\n");
		buf.append("    int[] int_arr;\n");
		buf.append("    long[] long_arr;\n");
		buf.append("    Vector[] vector_arr;\n");
		buf.append("    Collection[] collection_arr;\n");
		buf.append("    Object[][] objectArrArr;\n");
		buf.append("    Collection[][] collection_arrarr;\n");
		buf.append("    Vector[][] vector_arrarr;\n");
		buf.append("}\n");
		ICompilationUnit cu1=pack1.createCompilationUnit("E.java", buf.toString(), false, null);
		
		CompilationUnit astRoot= AST.parseCompilationUnit(cu1, true);