Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » substring Syntax Highlighting
substring Syntax Highlighting [message #453056] Thu, 20 July 2006 16:01
SarayuGeethanjali is currently offline SarayuGeethanjaliFriend
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.
Previous Topic:Syntax Highlighting
Next Topic:Context-sensitive help - menus and actions - bizarre behaviour
Goto Forum:
  


Current Time: Sat Oct 05 10:36:51 GMT 2024

Powered by FUDForum. Page generated in 0.03439 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top