Bug 38570 Source generation wizards; Add button to open preference page
M1 The Getter/Setter wizard should offer an access to the Code Generation Preference page: Field prefix/suffix, getter/setter body content, method comment template Add delegate, constructor and override could have a button for the method comment template The code to open a preference page programatically can be copied from TodoTaskPropertyPage.showPreferencePage
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/AddGetterSetterAction.java
return type.getCompilationUnit() != null && type.isClass() && !type.isLocal();
		}
		if ((selection.size() == 1) && (selection.getFirstElement() instanceof ICompilationUnit))
			return true;
		return false;
	}	
	private boolean canRunOn(IField[] fields) throws JavaModelException {
		if (fields != null && fields.length > 0) {
			for (int i= 0; i < fields.length; i++) {
				if (JdtFlags.isEnum(fields[i])) {
					MessageDialog.openInformation(getShell(), DIALOG_TITLE, ActionMessages.getString("AddGetterSetterAction.enum_not_applicable")); 			
					return false;
				}
			}
			return true;
		}
		return false;
	}
	
	private void resetNumEntries() {
		fNumEntries= 0;
	}
	
	private void incNumEntries() {
		fNumEntries++;
	}
	private void run(IType type, IField[] preselected, boolean editor) throws CoreException {
		if (type.isEnum()) {
			MessageDialog.openInformation(getShell(), DIALOG_TITLE, ActionMessages.getString("AddGetterSetterAction.enum_not_applicable")); 
			return;