Author: scabanovich
Date: 2007-11-06 10:29:46 -0500 (Tue, 06 Nov 2007)
New Revision: 4741
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
JBIDE-1236
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2007-11-06
14:59:02 UTC (rev 4740)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2007-11-06
15:29:46 UTC (rev 4741)
@@ -844,14 +844,18 @@
}
public static boolean projectExistsIgnoreCase(String name) {
- if(name == null || name.length() == 0) return false;
+ return findProjectIgnoreCase(name) != null;
+ }
+
+ public static IProject findProjectIgnoreCase(String name) {
+ if(name == null || name.length() == 0) return null;
IProject[] ps = ModelPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0; i < ps.length; i++) {
if(ps[i].getName().equalsIgnoreCase(name)) {
- return true;
+ return ps[i];
}
}
- return false;
+ return null;
}
}
Show replies by date