Bug 44181 Source->delegate works only for public methods [code manipulation]
Hi, Generate Delegate methods display only public methods for target class. For classes in the same package also default and protected methods should be shown. And for subclasses in other packages protected should be shown (I think more for completeness than for usefulness). Bye
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddDelegateMethodsAction.java
}
			Object firstElement = selection.getFirstElement();
			if (firstElement instanceof IType)
				run((IType) firstElement, new IField[0], false);
			else if (firstElement instanceof ICompilationUnit)
				run(JavaElementUtil.getMainType((ICompilationUnit) firstElement), new IField[0], false);
			else
				MessageDialog.openInformation(getShell(), DIALOG_TITLE, ActionMessages.getString("AddDelegateMethodsAction.not_applicable")); 
		} catch (CoreException e) {
			ExceptionHandler.handle(e, getShell(), DIALOG_TITLE, ActionMessages.getString("AddDelegateMethodsAction.error.actionfailed")); 
		}
	}
	private static boolean canRunOn(IType type) throws JavaModelException {
		if (type == null || type.getCompilationUnit() == null || type.isInterface())
			return false;
		return canRunOn(type.getFields());
	}
	private static boolean canRunOn(IField[] fields) throws JavaModelException {
		if (fields == null) {
			return false;
		}
		int count = 0;
		for (int i = 0; i < fields.length; i++) {
			if (!hasPrimitiveType(fields[i]) || isArray(fields[i])) {
				count++;
			}
		}
		return (count > 0);
	}
	/*