Posted 20 years ago
by Jeff Key
![Avatar](https://secure.gravatar.com/avatar/ce5975cbe04be42057d89134daae4cc8.jpg?s=64&d=identicon&r=g)
I've tried the following, but it doesn't appear to be working. Ideas?
If I iterate through the reservedWordsPatternGroup after adding "jeff", it is indeed in there, but it's not highlighted in the editor.
Thanks!
[ 05-05-2004: Message edited by: Jeff Key ]
SyntaxLanguage syntaxLanguage = editor.Language;
LexicalState lexicalState = syntaxLanguage.DefaultLexicalState;
LexicalPatternGroupCollection patternGroups = lexicalState.LexicalPatternGroups;
LexicalPatternGroup reservedWordsPatternGroup = patternGroups["ReservedWords"];
syntaxLanguage.IsUpdating = true;
reservedWordsPatternGroup.Add(new LexicalPattern("jeff"));
syntaxLanguage.IsUpdating = false;
Thanks!
[ 05-05-2004: Message edited by: Jeff Key ]