Author: scabanovich
Date: 2007-08-27 08:03:49 -0400 (Mon, 27 Aug 2007)
New Revision: 3345
Modified:
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/adopt/AdoptProjectFinisher.java
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/sync/SyncProjectContext.java
Log:
JBIDE-850
Modified:
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/adopt/AdoptProjectFinisher.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/adopt/AdoptProjectFinisher.java 2007-08-27
12:03:23 UTC (rev 3344)
+++
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/adopt/AdoptProjectFinisher.java 2007-08-27
12:03:49 UTC (rev 3345)
@@ -16,6 +16,7 @@
import java.util.Map;
import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelConstants;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.jst.web.context.IImportWebProjectContext;
@@ -87,7 +88,7 @@
}
private void createWebInfFileSystem() {
- getOrCreateFileSystem("WEB-INF", "%redhat.workspace%",
true);
+ getOrCreateFileSystem("WEB-INF", XModelConstants.WORKSPACE_REF, true);
}
private void createWebXMLFileSystem() {
@@ -95,7 +96,7 @@
String webxmlfolder = webxml.getParent();
String relative = getRelativePath(workspace, webxmlfolder);
if(relative == null || relative.startsWith("/..")) {
- String loc = (relative == null) ? webxmlfolder :
"%redhat.workspace%" + relative;
+ String loc = (relative == null) ? webxmlfolder :
XModelConstants.WORKSPACE_REF + relative;
getOrCreateFileSystem("web-xml", loc, true);
web.setAttributeValue("model path", "/" +
webxml.getName());
} else {
@@ -118,7 +119,7 @@
String configLoc = config.getParent();
String relative = getRelativePath(workspace, configLoc);
if(relative == null || relative.startsWith("/..")) {
- String loc = (relative == null) ? configLoc : "%redhat.workspace%"
+ relative;
+ String loc = (relative == null) ? configLoc : XModelConstants.WORKSPACE_REF +
relative;
getOrCreateFileSystem(fsn + "-config-xml", loc, false);
m.setAttributeValue("model path", "/" +
config.getName());
} else {
@@ -246,7 +247,7 @@
public static String getFileSystemLocation(String rootpath, String path) {
path = path.replace('\\', '/');
String relative = getRelativePath(rootpath, path);
- return (relative == null) ? path : "%redhat.workspace%" + relative;
+ return (relative == null) ? path : XModelConstants.WORKSPACE_REF + relative;
}
}
Modified:
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/sync/SyncProjectContext.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/sync/SyncProjectContext.java 2007-08-27
12:03:23 UTC (rev 3344)
+++
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/webprj/model/helpers/sync/SyncProjectContext.java 2007-08-27
12:03:49 UTC (rev 3345)
@@ -571,7 +571,7 @@
if(loc != null && loc.startsWith("/..")) loc = loc.substring(3);
//$NON-NLS-1$
if(loc.startsWith("/..")) { //$NON-NLS-1$
int i = loc.lastIndexOf("/"); //$NON-NLS-1$
- String fsp = "%redhat.workspace%" + "/.." + loc.substring(0,
i); //$NON-NLS-1$ //$NON-NLS-2$
+ String fsp = XModelConstants.WORKSPACE_REF + "/.." + loc.substring(0, i);
//$NON-NLS-1$ //$NON-NLS-2$
loc = loc.substring(i);
XModelObject f = m.getModel().getByPath(loc);
if(f == null) {
Show replies by date