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
import org.eclipse.jdt.internal.ui.actions.SelectionConverter;
import org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter;
import org.eclipse.jdt.internal.ui.dialogs.SourceActionDialog;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
import org.eclipse.jdt.internal.ui.util.BusyIndicatorRunnableContext;
import org.eclipse.jdt.internal.ui.util.ElementValidator;
import org.eclipse.jdt.internal.ui.util.ExceptionHandler;
/**
 * Creates delegate methods for a type's fields. Opens a dialog with a list of
 * fields for which delegate methods can be generated. User is able to check or
 * uncheck items before methods are generated.
 * <p>
 * Will open the parent compilation unit in a Java editor. The result is 
 * unsaved, so the user can decide if the changes are acceptable.
 * <p>
 * The action is applicable to structured selections containing elements
 * of type <code>IField</code> or <code>IType</code>.
 * 
 * <p>
 * This class may be instantiated; it is not intended to be subclassed.
 * </p>
 * 
 * Contributors:
 *   Martin Moebius: m.moebius@gmx.de - bug: 28793 
 * @since 2.1
 */
public class AddDelegateMethodsAction extends SelectionDispatchAction {