Author: scabanovich
Date: 2007-12-20 08:03:53 -0500 (Thu, 20 Dec 2007)
New Revision: 5398
Modified:
trunk/common/plugins/org.jboss.tools.common.model/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java
Log:
JBIDE-1498 Sevaral remaining attributes renamed.
Modified: trunk/common/plugins/org.jboss.tools.common.model/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/META-INF/MANIFEST.MF 2007-12-20
12:35:00 UTC (rev 5397)
+++ trunk/common/plugins/org.jboss.tools.common.model/META-INF/MANIFEST.MF 2007-12-20
13:03:53 UTC (rev 5398)
@@ -76,6 +76,7 @@
org.eclipse.debug.ui,
org.eclipse.help,
org.eclipse.ant.ui,
+ org.eclipse.ant.core,
org.eclipse.ltk.core.refactoring,
org.eclipse.ltk.ui.refactoring,
org.eclipse.wst.common.uriresolver,
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2007-12-20
12:35:00 UTC (rev 5397)
+++
trunk/common/plugins/org.jboss.tools.common.model/resources/help/keys-model.properties 2007-12-20
13:03:53 UTC (rev 5398)
@@ -553,8 +553,9 @@
IMPORT_JSF_PROJECT_WIZARD_WINDOW_TITLE = Import JSF Project
# step 1 content
-WebPrjAdoptStepName_web.xml_location = web.xml Location
-WebPrjAdoptStepName_name = Project Name
+WebPrjAdoptStepName_web.xml_location = web.xml Location
+WebPrjAdoptStepName_name = Project Name
+WebPrjAdoptStepName_link = Create Eclipse project in Workspace
# step 1A content
WebPrjAdoptAddStruts_version=Version
WebPrjAdoptAddStruts_servlet_class=Servlet Class
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta 2007-12-20
12:35:00 UTC (rev 5397)
+++
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta 2007-12-20
13:03:53 UTC (rev 5398)
@@ -383,7 +383,7 @@
<Editor name="FolderChooser"/>
</XModelAttribute>
<XModelAttribute name="owner" visibility="false"
xmlname="OWNER"/>
- <XModelAttribute name="info" visibility="false"
xmlname="INFO"/>
+ <XModelAttribute name="info" visibility="false"
xmlname="info"/>
<XModelAttribute default="false"
name="set location relative to project" visibility="false">
<Constraint loader="ListString">
@@ -512,7 +512,7 @@
<Editor name="FileChooser"/>
</XModelAttribute>
<XModelAttribute name="owner" visibility="false"
xmlname="OWNER"/>
- <XModelAttribute name="info" visibility="false"
xmlname="INFO"/>
+ <XModelAttribute name="info" visibility="false"
xmlname="info"/>
<XModelAttribute default="false"
name="set location relative to project" visibility="false">
<Constraint loader="ListString">
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2007-12-20
12:35:00 UTC (rev 5397)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsLoader.java 2007-12-20
13:03:53 UTC (rev 5398)
@@ -259,6 +259,7 @@
Set<String> children = super.getAllowedChildren(entity);
if(isFileSystems(entity.getXMLSubPath())) {
children.add("WEB");
+ children.add("web");
}
return children;
}
@@ -267,6 +268,7 @@
Set<String> attributes = super.getAllowedAttributes(entity);
if(isFileSystems(entity.getXMLSubPath())) {
attributes.add("WORKSPACE_HOME");
+ attributes.add("workspace-home");
}
return attributes;
}
@@ -284,7 +286,8 @@
public void loadChildren(Element element, XModelObject o) {
super.loadChildren(element, o);
if(isFileSystems(element.getNodeName())) {
- Element e = XMLUtil.getUniqueChild(element, "WEB");
+ Element e = XMLUtil.getUniqueChild(element, "web");
+ if(e == null) e = XMLUtil.getUniqueChild(element, "WEB");
XModelObject w = getWeb(o);
if(w != null && e != null) load(e, w);
}
@@ -307,7 +310,7 @@
if(project == null) return;
String relative = workspace.startsWith(project + "/") ?
"." + workspace.substring(project.length()) : workspace;
- element.setAttribute("WORKSPACE_HOME", relative);
+ element.setAttribute("workspace-home", relative);
}
static Map<String,String> oldAttributes = new HashMap<String, String>();
@@ -317,6 +320,9 @@
oldAttributes.put("workspace-home", "WORKSPACE_HOME");
oldAttributes.put("info", "INFO");
oldAttributes.put("location", "LOCATION");
+ oldAttributes.put("model-path", "MODEL_PATH");
+ oldAttributes.put("root", "ROOT");
+ oldAttributes.put("src", "SRC");
}
public String getAttribute(Element element, String xmlname) {
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java 2007-12-20
12:35:00 UTC (rev 5397)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java 2007-12-20
13:03:53 UTC (rev 5398)
@@ -15,6 +15,7 @@
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.*;
+import org.w3c.dom.Element;
public class ProjectHome {
@@ -44,7 +45,13 @@
}
private String getLocationFrom_strutsstudio_File(String location, File ss) {
- String path = XMLUtil.getElement(ss).getAttribute("WORKSPACE_HOME");
+ Element element = XMLUtil.getElement(ss);
+ String path = "";
+ if(element.hasAttribute("workspace-home")) {
+ path = element.getAttribute("workspace-home");
+ } else if(element.hasAttribute("WORKSPACE_HOME")) {
+ path = element.getAttribute("WORKSPACE_HOME");
+ }
String q = (path.equals(".")) ? location : (path.startsWith("./"))
? location + path.substring(1) : path;
return q;
}