Author: scabanovich
Date: 2012-01-03 19:38:59 -0500 (Tue, 03 Jan 2012)
New Revision: 37621
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/helpers/WebAppHelper.java
Log:
JBIDE-10579
https://issues.joss.org/browse/JBIDE-10579
Method WebAppHelper.getFilters is fixed.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/helpers/WebAppHelper.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/helpers/WebAppHelper.java 2012-01-03
23:44:22 UTC (rev 37620)
+++
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/helpers/WebAppHelper.java 2012-01-04
00:38:59 UTC (rev 37621)
@@ -54,6 +54,7 @@
if(entity.equals("FileWebApp")) return "2.3"; //$NON-NLS-1$
//$NON-NLS-2$
if(entity.equals("FileWebApp24")) return "2.4"; //$NON-NLS-1$
//$NON-NLS-2$
if(entity.equals("FileWebApp25")) return "2.5"; //$NON-NLS-1$
//$NON-NLS-2$
+ if(entity.equals("FileWebApp30")) return "3.0"; //$NON-NLS-1$
//$NON-NLS-2$
return "2.4"; //$NON-NLS-1$
}
@@ -335,7 +336,7 @@
XModelObject folder = webxml.getChildByPath(FILTER_FOLDER);
if(folder == null) folder = webxml;
if(folder.getModelEntity().getChild(FILTER_30_ENTITY) != null) {
- folder.getChildren(FILTER_30_ENTITY);
+ return folder.getChildren(FILTER_30_ENTITY);
}
return folder.getChildren(FILTER_ENTITY);
}
@@ -344,7 +345,7 @@
if(webxml == null) return null;
XModelObject folder = webxml.getChildByPath(FILTER_FOLDER);
if(folder == null) folder = webxml;
- String entity = (folder != webxml &&
folder.getModelEntity().getName().endsWith("24")) //$NON-NLS-1$
+ String entity = (folder.getModelEntity().getChild(FILTER_MAPPING_24_ENTITY) !=
null)
? FILTER_MAPPING_24_ENTITY : FILTER_MAPPING_ENTITY;
return folder.getChildren(entity);
}