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/GenerateNewConstructorUsingFieldsAction.java
}
	
	void run(IType type, IField[] selected, boolean activated) throws CoreException {
		if (!ElementValidator.check(type, getShell(), ActionMessages.GenerateConstructorUsingFieldsAction_error_title, activated))
			return;
		if (!ActionUtil.isProcessable(getShell(), type))
			return;
		IField[] candidates= type.getFields();
		ArrayList fields= new ArrayList();
		for (int index= 0; index < candidates.length; index++) {
			boolean isStatic= Flags.isStatic(candidates[index].getFlags());
			boolean isFinal= Flags.isFinal(candidates[index].getFlags());
			if (!isStatic) {
				if (isFinal) {
					try {
						
						IScanner scanner= ToolFactory.createScanner(true, false, false, false);
						scanner.setSource(candidates[index].getSource().toCharArray());
						TokenScanner tokenScanner= new TokenScanner(scanner);
						tokenScanner.getTokenStartOffset(ITerminalSymbols.TokenNameEQUAL, 0);
					} catch (JavaModelException e) {
					} catch (CoreException e) {
						fields.add(candidates[index]);
					}
				} else
					fields.add(candidates[index]);
			}
		}
		if (fields.isEmpty()) {
			MessageDialog.openInformation(getShell(), ActionMessages.GenerateConstructorUsingFieldsAction_error_title, ActionMessages.GenerateConstructorUsingFieldsAction_typeContainsNoFields_message);