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/QuickFixTest.java
public static void assertEqualStringsIgnoreOrder(String[] str1, String[] str2) {
		ArrayList list1= new ArrayList(Arrays.asList(str1));
		ArrayList list2= new ArrayList(Arrays.asList(str2));
		
		for (int i= list1.size() - 1; i >= 0; i--) {
			if (list2.remove(list1.get(i))) {
				list1.remove(i);
			}
		}
		
		int n1= list1.size();
		int n2= list2.size();
		
		if (n1 + n2 > 0) {
			if (n1 == 1 && n2 == 1) {
				assertEqualString((String) list1.get(0), (String) list2.get(0));
			}
			
			StringBuffer buf= new StringBuffer();
			buf.append("Content not as expected: Content is: \n");
			for (int i= 0; i < n1; i++) {
				String s1= (String) list1.get(i);
				if (s1 != null) {
					buf.append(s1);
					buf.append("\n");
				}
			}
			buf.append("Expected contents: \n");
			for (int i= 0; i < n2; i++) {
				String s2= (String) list2.get(i);