Author: scabanovich
Date: 2007-10-24 08:07:23 -0400 (Wed, 24 Oct 2007)
New Revision: 4455
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java
Log:
JBIDE-1120
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java 2007-10-24
11:17:49 UTC (rev 4454)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/InnerModelHelper.java 2007-10-24
12:07:23 UTC (rev 4455)
@@ -15,8 +15,10 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.jst.ws.internal.common.J2EEUtils;
+import org.eclipse.core.runtime.Path;
import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelConstants;
import org.jboss.tools.common.model.XModelObject;
@@ -36,10 +38,9 @@
IPath webInfPath = null;
if(ComponentCore.createComponent(project)!=null) {
- webInfPath = J2EEUtils.getWebInfPath(project);
- }
+ webInfPath = getWebInfPath(project);
+ }
-
if(webInfPath == null) return model;
IFolder webInfFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(webInfPath);
@@ -66,4 +67,12 @@
return model;
}
+ //Taken from J2EEUtils and modified
+ public static IPath getWebInfPath(IProject project) {
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IVirtualFolder webInfDir = component.getRootFolder().getFolder(new
Path("/WEB-INF"));
+ IPath modulePath = webInfDir.getWorkspaceRelativePath();
+ return (!webInfDir.exists()) ? null : modulePath;
+ }
+
}