Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jaxb
diff options
context:
space:
mode:
authortle2012-04-11 20:42:33 -0400
committertle2012-04-11 20:42:33 -0400
commit40b2be4b87da52fe70eb43d664c2305a1ed4216a (patch)
tree3fd7882e7edbc180c7be80439b971e8cd25ae74c /jaxb
parentb58d0a60e323bd0bc6dd8332c67e5603ea3a1d6c (diff)
downloadwebtools.dali-40b2be4b87da52fe70eb43d664c2305a1ed4216a.tar.gz
webtools.dali-40b2be4b87da52fe70eb43d664c2305a1ed4216a.tar.xz
webtools.dali-40b2be4b87da52fe70eb43d664c2305a1ed4216a.zip
374661 - [EclipseLink] Generate Dynamic entities requires JPA project selection if in a view other than Project Explorer
Diffstat (limited to 'jaxb')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/wizards/classesgen/ClassesGeneratorWizard.java4
1 files changed, 2 insertions, 2 deletions
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 e4d8959a41..0c870fcd83 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
@@ -107,7 +107,7 @@ public class ClassesGeneratorWizard
public void addPages() {
super.addPages();
- if (this.selection != null) {
+ if (this.selection != null && ! this.selection.isEmpty()) {
this.javaProject = this.getJavaProjectFromSelection(this.selection);
this.projectWizardPage = new JavaProjectWizardPage(this.javaProject);
@@ -239,7 +239,7 @@ public class ClassesGeneratorWizard
// ********** internal methods **********
public IJavaProject getJavaProjectFromSelection(IStructuredSelection selection) {
- if(selection == null) {
+ if(selection == null || selection.isEmpty()) {
return null;
}
Object firstElement = selection.getFirstElement();

Back to the top