Bug 86602 AddDelegateMethodsActions
With the next integration build isInterface returns true for annotations. Some of the isInterface || && isAnnotation checks can be simplified now.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddDelegateMethodsAction.java
if (object2 instanceof IBinding[])
				second= Bindings.asString(((IBinding[]) object2)[1]);
			else if (object2 instanceof IVariableBinding)
				second= ((IBinding) object2).getName();
			return first.compareTo(second);
		}
	}
	private static final String DIALOG_TITLE= ActionMessages.getString("AddDelegateMethodsAction.error.title"); 
	private static boolean hasPrimitiveType(IField field) throws JavaModelException {
		String signature= field.getTypeSignature();
		char first= Signature.getElementType(signature).charAt(0);
		return (first != Signature.C_RESOLVED && first != Signature.C_UNRESOLVED);
	}
	private static boolean isArray(IField field) throws JavaModelException {
		return Signature.getArrayCount(field.getTypeSignature()) > 0;
	}
	private CompilationUnitEditor fEditor;
	/**
	 * Note: This constructor is for internal use only. Clients should not call this
	 * constructor.
	 */
	public AddDelegateMethodsAction(CompilationUnitEditor editor) {
		this(editor.getEditorSite());
		fEditor= editor;
		setEnabled(SelectionConverter.getInputAsCompilationUnit(editor) != null);
	}
	/**
	 * Creates a new <code>AddDelegateMethodsAction</code>. The action requires that
	 * the selection provided by the site's selection provider is of type <code>
	 * org.eclipse.jface.viewers.IStructuredSelection</code>.