Reparse a Document

SyntaxEditor for WPF Forum

Posted 14 years ago by Martin - Blaise - Statistics Netherlands
Version: 9.2.0514
Avatar
Hi... yes here is he again;)

In the Forms syntax editor there was a method Document.Reparse();.

How to enforce or queue a parse in the WPF editor? The document itself is unchanged, but it uses include files which could be changed.

Thanks

Martin

Comments (5)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Martin,

Correct there is no Reparse method in there right now. Could you give some more details on what you need this for? For instance is it just for triggering the IParser to be called or for something else too?


Actipro Software Support

Posted 14 years ago by Martin - Blaise - Statistics Netherlands
Avatar
Only the (i)parser for the current document should be called. The document itself isnt changed, but the parser reads other files to include.

ML
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
We have a QueueParseRequest method on CodeDocument right now but it's private. We'll make it public for the next version. It's what we call when text changes occur, etc.


Actipro Software Support

Posted 12 years ago by Nassim Farhat
Avatar
I've used "QueueParseRequest" after clearing and updating a set of patterns inside a lexicalpatterngroup and it did not work, my patterns did not update with the proper color.... am i missing something so that the document view shows my updated patterns correctly?

here is my code:

lexicalPatternGroup.Patterns.Clear();
                    foreach (var element in newPatterns)
                        lexicalPatternGroup.Patterns.Add(new DynamicLexicalPattern(element));

                    editor.Document.QueueParseRequest();

                    editor.Document.CurrentSnapshot
Maybe i have to call a refresh somewhere there?
Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
QueueParseRequest is for parsing. You would need to call SyntaxEditor.InvalidateViews() I believe to refresh syntax highlighting.


Actipro Software Support

The latest build of this product (v24.1.2) was released 1 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.