Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Fullbright2013-04-30 19:04:44 +0000
committerPaul Fullbright2013-05-03 17:20:57 +0000
commit72838ed23cdea3f23135dce53683e0a3e9e595ad (patch)
tree7cb8dadca23e7f26272a79b9937786fda709df72 /jaxb/plugins
parent836173b5d12c607fd3db5999ec6cc7a3d21fa61a (diff)
downloadwebtools.dali-72838ed23cdea3f23135dce53683e0a3e9e595ad.tar.gz
webtools.dali-72838ed23cdea3f23135dce53683e0a3e9e595ad.tar.xz
webtools.dali-72838ed23cdea3f23135dce53683e0a3e9e595ad.zip
Fixed initialization of ClassesGeneratorWizard
Diffstat (limited to 'jaxb/plugins')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/ClassesGeneratorUi.java1
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java15
2 files changed, 11 insertions, 5 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/ClassesGeneratorUi.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/ClassesGeneratorUi.java
index 20363ac0df..fad8265b06 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/ClassesGeneratorUi.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/ClassesGeneratorUi.java
@@ -75,7 +75,6 @@ public class ClassesGeneratorUi {
*/
protected void generate() {
ClassesGeneratorWizard wizard = new ClassesGeneratorWizard(this.javaProject, this.xsdFile);
- wizard.setWindowTitle(JptJaxbUiMessages.CLASSES_GENERATOR_WIZARD_TITLE);
WizardDialog dialog = new WizardDialog(this.getCurrentShell(), wizard);
dialog.create();
int returnCode = dialog.open();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java
index e664242896..ea8ade0b26 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java
@@ -33,6 +33,7 @@ import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.jpt.common.ui.internal.WorkbenchTools;
import org.eclipse.jpt.common.ui.internal.dialogs.OptionalMessageDialog;
+import org.eclipse.jpt.common.ui.internal.swt.widgets.DisplayTools;
import org.eclipse.jpt.common.ui.internal.wizards.JavaProjectWizardPage;
import org.eclipse.jpt.jaxb.core.JaxbProject;
import org.eclipse.jpt.jaxb.core.JaxbProjectManager;
@@ -48,6 +49,7 @@ import org.eclipse.jpt.jaxb.ui.internal.gen.GenerateJaxbClassesJob;
import org.eclipse.jpt.jaxb.ui.internal.plugin.JptJaxbUiPlugin;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
@@ -96,18 +98,23 @@ public class ClassesGeneratorWizard
this.javaProject = javaProject;
this.preselectedXsdFile = xsdFile;
this.performsGeneration = false;
+ init(DisplayTools.getDisplay());
}
// ********** IWorkbenchWizard implementation **********
public void init(IWorkbench workbench, IStructuredSelection sel) {
- this.resourceManager = new LocalResourceManager(JFaceResources.getResources(workbench.getDisplay()));
this.selection = sel;
+ init(workbench.getDisplay());
+ }
+
+ protected void init(Display display) {
+ this.resourceManager = new LocalResourceManager(JFaceResources.getResources(display));
- this.setWindowTitle(JptJaxbUiMessages.CLASSES_GENERATOR_WIZARD_TITLE);
- this.setDefaultPageImageDescriptor(JptJaxbUiImages.CLASSES_GEN_BANNER);
- this.setNeedsProgressMonitor(true);
+ setWindowTitle(JptJaxbUiMessages.CLASSES_GENERATOR_WIZARD_TITLE);
+ setDefaultPageImageDescriptor(JptJaxbUiImages.CLASSES_GEN_BANNER);
+ setNeedsProgressMonitor(true);
}

Back to the top