Author: akazakov
Date: 2012-01-09 20:04:32 -0500 (Mon, 09 Jan 2012)
New Revision: 37734
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java
Log:
https://issues.jboss.org/browse/JBIDE-10606 Seam Generate Entities wizard problem
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java 2012-01-09
23:21:40 UTC (rev 37733)
+++
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamGenerateEntitiesWizardPage.java 2012-01-10
01:04:32 UTC (rev 37734)
@@ -18,6 +18,7 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
@@ -219,6 +220,7 @@
if(ISeamParameter.SEAM_PROJECT_NAME.equals(event.getPropertyName()) &&
event.getNewValue()!=null &&
!event.getNewValue().equals(event.getOldValue())) {
+ rootSeamProject = SeamWizardUtils.getRootSeamProject(getSelectedProject());
String consoleConfigName =
getConsoleConfigurationName(event.getNewValue().toString());
if(consoleConfigName!=null) {
configEditor.setValue(consoleConfigName);
@@ -226,7 +228,18 @@
}
wizardChanged();
}
-
+
+ public IProject getSelectedProject() {
+ String projectName = projectEditor.getValueAsString();
+ if(projectName!=null && projectName.trim().length()>0) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if(project.exists()) {
+ return (IProject)project;
+ }
+ }
+ return null;
+ }
+
public void wizardChanged(){
existingReveng.setEnabled("reverse".equals(radios.getValue()));
reverseEngineeringSettings.setEnabled(existingReveng.isEnabled() &&
existingReveng.isSelected());