Author: dazarov
Date: 2009-08-11 12:42:03 -0400 (Tue, 11 Aug 2009)
New Revision: 17048
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4424
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java 2009-08-11
16:41:44 UTC (rev 17047)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/HyperlinkPartitionerDefinition.java 2009-08-11
16:42:03 UTC (rev 17048)
@@ -356,6 +356,7 @@
private static String ALL_TAGS = "/*/"; //$NON-NLS-1$
private static String DELIM = "/"; //$NON-NLS-1$
+ private static String TAGLIB = "/["; //$NON-NLS-1$
public boolean containtsPath(String path) {
path = getCorrectPath(path);
@@ -364,10 +365,12 @@
}
if(fDelimitedPathElements!=null) {
int lastIndex = -1;
+ int tagLib = -1;
for(int i=0; i<fDelimitedPathElements.length; i++) {
if(i==0 && !fStartDelim) {
if(path.startsWith(fDelimitedPathElements[i])) {
lastIndex = 0;
+ tagLib = 0;
continue;
} else {
return false;
@@ -376,6 +379,8 @@
int currentIndex = path.indexOf(fDelimitedPathElements[i]);
if(currentIndex>-1 && currentIndex>lastIndex) {
lastIndex = currentIndex;
+ if(fDelimitedPathElements[i].startsWith(TAGLIB))
+ tagLib = lastIndex;
continue;
} else {
return false;
@@ -383,7 +388,9 @@
}
}
if(fEndDelim ||
path.endsWith(fDelimitedPathElements[fDelimitedPathElements.length-1])) {
- return true;
+ int lastTaglib = path.lastIndexOf(TAGLIB);
+ if(lastTaglib <= tagLib)
+ return true;
}
return false;
}