Author: scabanovich
Date: 2011-11-23 17:33:38 -0500 (Wed, 23 Nov 2011)
New Revision: 36586
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckClass.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
Log:
JBIDE-10190
https://issues.jboss.org/browse/JBIDE-10190
Migrated validation for web.xml.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckClass.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckClass.java 2011-11-23
20:48:38 UTC (rev 36585)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/CheckClass.java 2011-11-23
22:33:38 UTC (rev 36586)
@@ -48,6 +48,11 @@
public void check(XModelObject object) {
if(attr == null) return;
String value = object.getAttributeValue(attr);
+ if(value == null) {
+ System.out.println("Entity=" + object.getModelEntity().getName());
+ System.out.println("Attr=" + attr);
+ return;
+ }
if(value.length() == 0 || isJavaLang(value)) return;
if(isPrimitive(value)) {
if(!allowsPrimitive) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java 2011-11-23
20:48:38 UTC (rev 36585)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/validation/WebXMLCoreValidator.java 2011-11-23
22:33:38 UTC (rev 36586)
@@ -249,7 +249,7 @@
try {
// This code line never return null
- webInf = project.getFolder(webContentPath.append("WEB-INF")); //$NON-NLS-1$
+ webInf =
project.getFolder(webContentPath.removeFirstSegments(1).append("WEB-INF"));
//$NON-NLS-1$
// so never check it for null
if(webInf.isAccessible()) {
IResource[] rs = webInf.members();