Author: scabanovich
Date: 2010-03-19 11:39:44 -0400 (Fri, 19 Mar 2010)
New Revision: 20934
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebProjectContext.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5888
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2010-03-19 14:52:24
UTC (rev 20933)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/meta/web.meta 2010-03-19 15:39:44
UTC (rev 20934)
@@ -418,6 +418,7 @@
<value name="2.3"/>
<value name="2.4"/>
<value name="2.5"/>
+ <value name="3.0"/>
</Constraint>
<Editor name="List"/>
</XModelAttribute>
@@ -668,6 +669,7 @@
<value name="2.3"/>
<value name="2.4"/>
<value name="2.5"/>
+ <value name="3.0"/>
</Constraint>
<Editor name="List"/>
</XModelAttribute>
@@ -873,6 +875,7 @@
<value name="2.3"/>
<value name="2.4"/>
<value name="2.5"/>
+ <value name="3.0"/>
</Constraint>
<Editor name="List"/>
</XModelAttribute>
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebProjectContext.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebProjectContext.java 2010-03-19
14:52:24 UTC (rev 20933)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/context/ImportWebProjectContext.java 2010-03-19
15:39:44 UTC (rev 20934)
@@ -260,6 +260,7 @@
if("2.3".equals(servletVersion) &&
!entity.equals("FileWebApp")) return false; //$NON-NLS-1$ //$NON-NLS-2$
if("2.4".equals(servletVersion) &&
!entity.equals("FileWebApp24")) return false; //$NON-NLS-1$ //$NON-NLS-2$
if("2.5".equals(servletVersion) &&
!entity.equals("FileWebApp25")) return false; //$NON-NLS-1$ //$NON-NLS-2$
+ if("3.0".equals(servletVersion) &&
!entity.equals("FileWebApp30")) return false; //$NON-NLS-1$ //$NON-NLS-2$
return true;
}
@@ -272,6 +273,8 @@
convertWebXML("FileWebApp24", backup); //$NON-NLS-1$
} else if("2.5".equals(servletVersion) &&
!entity.equals("FileWebApp25")) { //$NON-NLS-1$ //$NON-NLS-2$
convertWebXML("FileWebApp25", backup); //$NON-NLS-1$
+ } else if("3.0".equals(servletVersion) &&
!entity.equals("FileWebApp30")) { //$NON-NLS-1$ //$NON-NLS-2$
+ convertWebXML("FileWebApp30", backup); //$NON-NLS-1$
}
}
@@ -291,10 +294,11 @@
String n = as[i].getName();
String xmlname = as[i].getXMLName();
if(xmlname == null || xmlname.length() == 0) continue;
+ if("version".equals(xmlname) || xmlname.startsWith("xmlns"))
continue; //$NON-NLS-1$ //$NON-NLS-2$
XAttribute a = webxml.getModelEntity().getAttribute(n);
if(a == null) continue;
String v = webxml.getAttributeValue(n);
- if(v != null && !v.equals(a.getDefaultValue())) {
+ if(v != null && !v.equals(a.getDefaultValue()) &&
!v.equals(as[i].getDefaultValue())) {
newweb.setAttributeValue(n, v);
}
}