Author: scabanovich
Date: 2007-11-01 08:34:23 -0400 (Thu, 01 Nov 2007)
New Revision: 4615
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-01
11:45:27 UTC (rev 4614)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2007-11-01
12:34:23 UTC (rev 4615)
@@ -843,4 +843,15 @@
return (relative == null) ? path : XModelConstants.WORKSPACE_REF + relative;
}
+ public static boolean projectExistsIgnoreCase(String name) {
+ if(name == null || name.length() == 0) return false;
+ IProject[] ps = ModelPlugin.getWorkspace().getRoot().getProjects();
+ for (int i = 0; i < ps.length; i++) {
+ if(ps[i].getName().equalsIgnoreCase(name)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
}
Show replies by date