Skip to main content



      Home
Home » Newcomers » Newcomers » Highlighting keywords problem
Highlighting keywords problem [message #225553] Fri, 03 August 2007 05:47
Eclipse UserFriend
Hello,
I'm trying to write an Editor Plug-in for FL language.

I manged to do the highlighting, but I have a problem with the keywords
coloring.
it colors the keywords also when they have a prefix.

for example, "let" is a key word in FL :
let
bullet
in both these words the "let" sequence will be colored (i.e. bul<LET>).
(for words postfix, like "letx" it knows not to color them)


I use a simple WordRule for the scanner:
/***************/

WordRule wordRule = new WordRule(new IWordDetector() {
public boolean isWordStart(char c) {
return !Character.isWhitespace(c);
}
public boolean isWordPart(char c) {
return !(Character.isWhitespace(c)
|| (c == ';') || (c == '('));
}
});

wordRule.addWord("let",keyword);
rules[1] = wordRule;

/***************/

I know the JavaEditor example can distinguish a prefix from a word,
but I can't see where it is defined.


any ideas ?
Previous Topic:Testing IDE based on eclipse in linux
Next Topic:Problem using Eclipse 3.1
Goto Forum:
  


Current Time: Sun Nov 09 17:19:29 EST 2025

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

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

Back to the top