Author: scabanovich
Date: 2009-06-09 11:16:17 -0400 (Tue, 09 Jun 2009)
New Revision: 15821
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/PositionSearcher.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4447
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/PositionSearcher.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/PositionSearcher.java 2009-06-09
14:15:27 UTC (rev 15820)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/PositionSearcher.java 2009-06-09
15:16:17 UTC (rev 15821)
@@ -121,7 +121,12 @@
if(!inValue) {
int k = t.indexOf(name);
if(k >= 0) {
- return pos + k;
+ boolean ok = true;
+ if(k > 0) {
+ char c = t.charAt(k - 1);
+ if(Character.isJavaIdentifierPart(c) || c == '-') ok = false;
+ }
+ if(ok) return pos + k;
}
}
}