Bug 112440 Generate Delegate Methods does not work in anonymous types
Build ID: I20051011-1655 When selecting "Generate Delegate Methods" for an anonymous type, the refactoring does not use the fields of the anonymous type, but of the enclosing type as a reference (1). When inserting methods (from fields of the enclosing type) at the current position, it fails without an error message (2). 1) Select "Foo()", invoke the Refactoring => No generation possible 2) Add a field to top-level class Foo, select "Foo()" invoke the Refactoring, select some method and "insert at current position" => Generation possible, but methods do not get inserted. ---- public class Foo { public void foo() { Foo d= new Foo() { Foo d; }; } } ----
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddDelegateMethodsAction.java
expanded.toArray(result);
				fExpanded= result;
			}
		}
		public CompilationUnit getCompilationUnit() {
			return fUnit;
		}
		public void dispose() {
		}
		public Object[] getChildren(Object element) {
			if (element instanceof IVariableBinding) {
				IVariableBinding binding= (IVariableBinding) element;
				List result= new ArrayList();
				final String key= binding.getKey();
				for (int index= 0; index < fBindings.length; index++)
					if (fBindings[index][0].getKey().equals(key))
						result.add(fBindings[index]);
				return result.toArray();
			}
			return null;
		}
		public int getCount() {
			return fCount;
		}
		public Object[] getElements(Object inputElement) {
			Set keys= new HashSet();
			List result= new ArrayList();
			for (int index= 0; index < fBindings.length; index++) {
				IBinding[] bindings= fBindings[index];
				final String key= bindings[0].getKey();