Author: estherbin
Date: 2008-09-04 12:16:57 -0400 (Thu, 04 Sep 2008)
New Revision: 10063
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
Log:
fix bugs.JBIDE-2667(2668)
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-09-04
06:37:46 UTC (rev 10062)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-09-04
16:16:57 UTC (rev 10063)
@@ -36,6 +36,12 @@
/** The Constant INSTANCE. */
private static final IELService INSTANCE = new ElService();
+ public static final String DOLLAR_PREFIX = "${"; //$NON-NLS-1$
+
+ private static final String SUFFIX = "}"; //$NON-NLS-1$
+
+ public static final String SHARP_PREFIX = "#{"; //$NON-NLS-1$
+
/**
* Checks if is available.
*
@@ -108,12 +114,17 @@
*
* @return the string
*/
- private String replace(String resourceString, ResourceReference[] references) {
+ private String replace(String resourceString, ResourceReference[] references) {
String result = resourceString;
for (ResourceReference rf : references) {
- if (resourceString.contains(rf.getLocation())) {
- result = result.replace(rf.getLocation(),rf.getProperties());
+ final String dollarEl =
String.valueOf(DOLLAR_PREFIX)+rf.getLocation()+String.valueOf(SUFFIX);
+ final String sharpEl =
String.valueOf(SHARP_PREFIX)+rf.getLocation()+String.valueOf(SUFFIX);
+
+ if (resourceString.contains(dollarEl)) {
+ result = result.replace(dollarEl, rf.getProperties());
+ }else if(resourceString.contains(sharpEl)){
+ result = result.replace(sharpEl, rf.getProperties());
}
}
return result;
Show replies by date