Author: dmaliarevich
Date: 2012-06-29 07:22:50 -0400 (Fri, 29 Jun 2012)
New Revision: 42301
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java
Log:
https://issues.jboss.org/browse/JBIDE-10531 - EL with no quotes cannot be used to
determine the bundle value.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java 2012-06-29
07:41:18 UTC (rev 42300)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/bundle/BundleMap.java 2012-06-29
11:22:50 UTC (rev 42301)
@@ -514,16 +514,36 @@
String name = expr.getMemberName();
if(name == null || name.length() == 0) return null;
if(expr instanceof ELPropertyInvocation) {
+ /*
+ * Simple EL like #{bundle.key} goes here
+ */
return new String[]{left.getText(), name};
} else if(expr instanceof ELArgumentInvocation) {
+ /*
+ * EL like #{bundle['compound.key']} goes here
+ */
if(name.startsWith("\"") || name.startsWith("'")) {
//$NON-NLS-1$ //$NON-NLS-2$
name = name.substring(1);
+ } else {
+ /*
+ *
https://issues.jboss.org/browse/JBIDE-10531
+ * EL with no quotes cannot be used to determine the bundle value.
+ */
+ return null;
}
if(name.endsWith("\"") || name.endsWith("'")) {
//$NON-NLS-1$ //$NON-NLS-2$
name = name.substring(0, name.length() - 1);
+ } else {
+ /*
+ *
https://issues.jboss.org/browse/JBIDE-10531
+ * EL with no quotes cannot be used to determine the bundle value.
+ */
+ return null;
}
- if(name.length() == 0) return null;
- return new String[]{left.getText(), name};
+ if (name.length() == 0) {
+ return null;
+ }
+ return new String[] { left.getText(), name };
}
return null;
}