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/ExtractInterfaceAction.java
/**
	 * Note: This method is for internal use only. Clients should not call this method.
	 */
	public void selectionChanged(JavaTextSelection selection) {
		try {
			setEnabled(canEnable(selection));
		} catch (JavaModelException e) {
			setEnabled(false);
		}
	}
	
	private boolean canEnable(JavaTextSelection selection) throws JavaModelException {
		IType type= RefactoringActions.getEnclosingOrPrimaryType(selection);
		return ExtractInterfaceRefactoring.isAvailable(type);
	}
	
    /*
     * @see SelectionDispatchAction#run(ITextSelection)
     */
	public void run(ITextSelection selection) {
		try {
			if (!ActionUtil.isProcessable(getShell(), fEditor))
				return;
			IType type= getSingleSelectedType();
			if (canRunOn(type)){
				startRefactoring(type);
			} else {
				String unavailable= RefactoringMessages.getString("ExtractInterfaceAction.To_activate"); 
				MessageDialog.openInformation(getShell(), RefactoringMessages.getString("OpenRefactoringWizardAction.unavailable"), unavailable); 
			}