substring Syntax Highlighting [message #453056] |
Thu, 20 July 2006 16:01 |
SarayuGeethanjali Messages: 7 Registered: July 2009 |
Junior Member |
|
|
Hi,
I have written CustomWordRule by extends WordRule class and overwrite the
WordRule's evaluate() method as
fBuffer.toString().toUpperCase()
I need to highlight substring of a word.
Eg: application is the keyword.
I need to highlight application word only in javaapplication word.
By using the below change in evaluate() method i am able to highlight
entire word javaapplication instead of application only.
ArrayList searchKeyword1 = new ArrayList();
searchKeyword1.add("application");
for(int i=0;i<searchKeyword1.size();i++)
{
if(fBuffer.toString().toUpperCase().indexOf(searchKeyword1.g et(i).toString()) >-1){
token= (IToken) fWords.get(searchKeyword1.get(i).toString());
break;
}
}
Please let me know how to handle to highlight a keyword in substring of
another word.
Thanks in Advance,
Sarayu.
|
|
|
Powered by
FUDForum. Page generated in 0.03439 seconds