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/GenerateNewConstructorUsingFieldsAction.java
}
			IEditorPart editor= EditorUtility.openInEditor(type.getCompilationUnit());
					
			IField[] workingCopyFields= (IField[]) result.toArray(new IField[result.size()]);
			CodeGenerationSettings settings= JavaPreferencesSettings.getCodeGenerationSettings(type.getJavaProject());
			settings.createComments= dialog.getGenerateComment();
			IJavaElement elementPosition= dialog.getElementPosition();
			
			IMethod selectedConstructor= dialog.getSuperConstructorChoice();
			IRewriteTarget target= editor != null ? (IRewriteTarget) editor.getAdapter(IRewriteTarget.class) : null;
			if (target != null) {
				target.beginCompoundChange();
			}
			try {						
				AddCustomConstructorOperation op= new AddCustomConstructorOperation(type, settings, workingCopyFields, false, elementPosition, selectedConstructor);
				op.setVisbility(dialog.getVisibilityModifier());
				
				if (selectedConstructor.getParameterNames().length == 0)
					op.setOmitSuper(dialog.isOmitSuper());
				
				IRunnableContext context= JavaPlugin.getActiveWorkbenchWindow();
				if (context == null) {
					context= new BusyIndicatorRunnableContext();
				}
				PlatformUI.getWorkbench().getProgressService().runInUI(context,
					new WorkbenchRunnableAdapter(op, op.getScheduleRule()),
					op.getScheduleRule());
				IMethod res= op.getCreatedConstructor();
				JavaModelUtil.reconcile(res.getCompilationUnit());
				EditorUtility.revealInEditor(editor, res);