Author: scabanovich
Date: 2007-11-06 10:30:18 -0500 (Tue, 06 Nov 2007)
New Revision: 4742
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
Log:
JBIDE-1236
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2007-11-06
15:29:46 UTC (rev 4741)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2007-11-06
15:30:18 UTC (rev 4742)
@@ -41,6 +41,7 @@
import org.jboss.tools.common.meta.action.impl.XEntityDataImpl;
import org.jboss.tools.common.meta.key.WizardKeys;
import org.jboss.tools.common.model.plugin.ModelPlugin;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XMLUtil;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.jst.web.context.ImportWebDirProjectContext;
@@ -307,6 +308,15 @@
setErrorMessage(WebUIMessages.PROJECT_EXISTS_IN_WORKSPACE + getProjectNameValue() +
" exists in workspace and is closed. To use the project, please open it.");
//$NON-NLS-2$
return false;
}
+ if(project == null || !project.exists()) {
+ IProject p1 = EclipseResourceUtil.findProjectIgnoreCase(projectName);
+ if(p1 != null) {
+ String message = NLS.bind(WebUIMessages.PROJECT_ALREADY_EXISTS_IN_THE_WORKSPACE,
p1.getName());
+ setErrorMessage(message);
+ return false;
+ }
+ }
+
if(context.isInitialized()) return true;
boolean hasNature = false;
boolean hasJavaNature = false;
Show replies by date