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
startRefactoring(getSingleSelectedType(selection));
		} catch (JavaModelException e) {
			ExceptionHandler.handle(e, RefactoringMessages.getString("OpenRefactoringWizardAction.refactoring"), RefactoringMessages.getString("OpenRefactoringWizardAction.exception")); 
		}
	}
	private static boolean canEnable(IStructuredSelection selection) throws JavaModelException{
		return canRunOn(getSingleSelectedType(selection));
	}
	
	private static IType getSingleSelectedType(IStructuredSelection selection) throws JavaModelException{
		if (selection.isEmpty() || selection.size() != 1) 
			return null;
		
		Object first= selection.getFirstElement();
		if (first instanceof IType)
			return (IType)first;
		if (first instanceof ICompilationUnit)	
			return JavaElementUtil.getMainType((ICompilationUnit)first);
		return null;
	}
	
	
	
    /*
     * @see SelectionDispatchAction#selectionChanged(ITextSelection)
     */
	public void selectionChanged(ITextSelection selection) {
		setEnabled(true);
	}