diff options
| author | Dani Megert | 2012-04-13 08:25:22 +0000 |
|---|---|---|
| committer | Dani Megert | 2012-04-13 08:25:22 +0000 |
| commit | 069fa7c38e2204e2dcf5044e52e841c2ba134927 (patch) | |
| tree | 51c77fb2144952ac6a2af677c75a70713a52e36d | |
| parent | 4c7bd5d4e517194e8648a4da76f01cd7c289ebc0 (diff) | |
| download | eclipse.jdt.ui-069fa7c38e2204e2dcf5044e52e841c2ba134927.tar.gz eclipse.jdt.ui-069fa7c38e2204e2dcf5044e52e841c2ba134927.tar.xz eclipse.jdt.ui-069fa7c38e2204e2dcf5044e52e841c2ba134927.zip | |
Fixed bug 376688: [type wizards] New class wizard doesn't remember
setting for which method stubs to create
| -rw-r--r-- | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizard.java | 3 | ||||
| -rw-r--r-- | org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewClassWizardPage.java | 27 |
2 files changed, 15 insertions, 15 deletions
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizard.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizard.java index e6d817985e..475d89b7b0 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizard.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewClassCreationWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -49,6 +49,7 @@ public class NewClassCreationWizard extends NewElementWizard { super.addPages(); if (fPage == null) { fPage= new NewClassWizardPage(); + fPage.setWizard(this); fPage.init(getSelection()); } addPage(fPage); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewClassWizardPage.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewClassWizardPage.java index cbbe2ad0f1..e525561add 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewClassWizardPage.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewClassWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -183,20 +183,8 @@ public class NewClassWizardPage extends NewTypeWizardPage { @Override public void setVisible(boolean visible) { super.setVisible(visible); - if (visible) { + if (visible) setFocus(); - } else { - IDialogSettings dialogSettings= getDialogSettings(); - if (dialogSettings != null) { - IDialogSettings section= dialogSettings.getSection(PAGE_NAME); - if (section == null) { - section= dialogSettings.addNewSection(PAGE_NAME); - } - section.put(SETTINGS_CREATEMAIN, isCreateMain()); - section.put(SETTINGS_CREATECONSTR, isCreateConstructors()); - section.put(SETTINGS_CREATEUNIMPLEMENTED, isCreateInherited()); - } - } } private void createMethodStubSelectionControls(Composite composite, int nColumns) { @@ -286,6 +274,17 @@ public class NewClassWizardPage extends NewTypeWizardPage { type.createMethod(buf.toString(), null, false, null); } + IDialogSettings dialogSettings= getDialogSettings(); + if (dialogSettings != null) { + IDialogSettings section= dialogSettings.getSection(PAGE_NAME); + if (section == null) { + section= dialogSettings.addNewSection(PAGE_NAME); + } + section.put(SETTINGS_CREATEMAIN, isCreateMain()); + section.put(SETTINGS_CREATECONSTR, isCreateConstructors()); + section.put(SETTINGS_CREATEUNIMPLEMENTED, isCreateInherited()); + } + if (monitor != null) { monitor.done(); } |
