Bug 121627 [[code generation wizards] AddGetterSetterAction object should provide getter method for dialog result.
I have a scenario where multiple document edits are desired as part of a quick fix implementation: 1. Invoking AddGetterSetterAction.run() to offer the creation of Getter/Setter methods 2. If the above is not canceled, change the access modifier for a public field to private. Unfortunately, the AddGetterSetterAction has no private field which tracks the dialog result (e.g. Window.OK) ... As a work-around, the user can use edit-undo to back off the access modifier change after a cancel operation...
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddDelegateMethodsAction.java
public int compare(Viewer viewer, Object object1, Object object2) {
			String first= ""; 
			String second= ""; 
			if (object1 instanceof IBinding[])
				first= fProvider.getText(((IBinding[]) object1)[1]);
			else if (object1 instanceof IVariableBinding)
				first= ((IBinding) object1).getName();
			if (object2 instanceof IBinding[])
				second= fProvider.getText(((IBinding[]) object2)[1]);
			else if (object2 instanceof IVariableBinding)
				second= ((IBinding) object2).getName();
			return fCollator.compare(first, second);
		}
	}
	private static final String DIALOG_TITLE= ActionMessages.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.
	 * 
	 * @param editor the compilation unit editor
	 */