Author: snjeza
Date: 2011-11-02 05:24:58 -0400 (Wed, 02 Nov 2011)
New Revision: 36130
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ImportDefaultMavenProjectExample.java
Log:
JBIDE-9926 Importing some of the BPEL Examples results in log error
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ImportDefaultMavenProjectExample.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ImportDefaultMavenProjectExample.java 2011-11-02
08:47:25 UTC (rev 36129)
+++
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/ImportDefaultMavenProjectExample.java 2011-11-02
09:24:58 UTC (rev 36130)
@@ -104,7 +104,9 @@
for (ZipEntry directory:directories) {
IPath resourcePath = new Path(directory.getName());
try {
- workspace.getRoot().getFolder(resourcePath).create(false, true, null);
+ if (resourcePath.segmentCount() > 1 &&
!workspace.getRoot().getFolder(resourcePath).exists()) {
+ workspace.getRoot().getFolder(resourcePath).create(false, true, null);
+ }
} catch (Exception e) {
ProjectExamplesActivator.log(e);
}
@@ -167,7 +169,9 @@
for (ZipEntry directory:directories) {
IPath resourcePath = new Path(directory.getName());
try {
- workspace.getRoot().getFolder(resourcePath).create(false, true, null);
+ if (resourcePath.segmentCount() > 1 &&
!workspace.getRoot().getFolder(resourcePath).exists()) {
+ workspace.getRoot().getFolder(resourcePath).create(false, true, null);
+ }
} catch (Exception e) {
ProjectExamplesActivator.log(e);
}