Author: vrubezhny
Date: 2010-12-24 11:19:43 -0500 (Fri, 24 Dec 2010)
New Revision: 27720
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java
Log:
JBIDE-7975
jsf validation gives property does not exist warning on messagebundle properties
The localization properties in facesConfig.xml are taken into account when searching for
resource bundles
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java
===================================================================
---
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java 2010-12-24
16:18:36 UTC (rev 27719)
+++
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/pv/JSFPromptingProvider.java 2010-12-24
16:19:43 UTC (rev 27720)
@@ -202,13 +202,24 @@
public List<Object> getBundleProperties(XModel model, String bundle) {
if(bundle == null || bundle.length() == 0) return EMPTY_LIST;
- XModelObject b = model.getByPath("/" + bundle.replace('.',
'/') + ".properties");
- if(b == null) return EMPTY_LIST;
- XModelObject[] os = b.getChildren();
+
+ OpenKeyHelper helper = new OpenKeyHelper();
+ XModelObject[] bundleObjects = helper.findBundles(model, bundle, null);
+ if (bundleObjects == null)
+ return EMPTY_LIST;
+// XModelObject b = model.getByPath("/" + bundle.replace('.',
'/') + ".properties");
+ Set properties = new TreeSet(String.CASE_INSENSITIVE_ORDER);
+ for (XModelObject b : bundleObjects) {
+ if(b == null) continue;
+ XModelObject[] os = b.getChildren();
+ for (int i = 0; i < os.length; i++) {
+// list.add(os[i].getAttributeValue("name"));
+ properties.add(os[i].getAttributeValue("name"));
+ }
+ }
List<Object> list = new ArrayList<Object>();
- for (int i = 0; i < os.length; i++) {
- list.add(os[i].getAttributeValue("name"));
- }
+ list.addAll(properties);
+
return list;
}
Show replies by date