Dynamic Additions to Pattern Group?

SyntaxEditor for Windows Forms Forum

Posted 18 years ago by Jerry
This is a Pattern Group I am testing. How can I make additions to it on the fly?

For example it has Test1 and test2 but what if at run time I wanted to add Test3?

Can this be done?

<ExplicitPatternGroup TokenKey="ReservedWordMyToken" Style="ReservedWordMyStyle" LookBehind="[^\.]" LookAhead="{NonWordMacro}" CaseSensitivity="AutoCorrect">
Test1 test2

Comments (2)

Posted 18 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Jerry,

You have to set the SyntaxLanguage.IsUpdating to true before making pattern changes. Then you get the language's state that contains the pattern group, find the pattern group within that, and add a new pattern to it. You can do that in the object model. Then when done, set SyntaxLanguage.IsUpdating back to false. That will reparse the document with your changes.

Actipro Software Support

Posted 18 years ago by Jerry


[Modified at 04/12/2006 07:29 PM]
The latest build of this product (v24.1.0) was released 4 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.