Update ParseData diagnosis will be cleared.

SyntaxEditor for WPF Forum

Posted 3 years ago by Sunshine - Appeon
Version: 21.1.1
Platform: .NET 5.0
Environment: Windows 10 (64-bit)
Avatar

Through debugging, I found that when the value of "IEditorView.SyntaxEditor.Document.ParseData" is updated, the diagnosis of the current document will be cleared.

The way I achieve diagnosis is to inherit ParseErrorTagger and add diagnostic information through the Add method.

Then register the service through:

this.RegisterService(new CodeDocumentTaggerProvider<DiagnosticTaggerClass>(typeof(DiagnosticTaggerClass)));

And there is no information related to diagnosis in my ParseData, why update ParseData will cause the diagnosis to be cleared.

Is this normal? I checked all the codes, only commented out the code used to update ParseData, the diagnosis can be displayed normally.

Comments (1)

Answer - Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The ParseErrorTagger watches the document's ParseDataChanged event and updates itself from the IParseErrorProvider.Errors collection implementation on the parse data (if implemented) whenever that event occurs.  My guess is that feature is what you are running into.

If you are making your own tagger for diagnostic information then I would suggest making a separate tagger for it, and not inheriting ParseErrorTagger.  You can have more than one tagger on a document for ISquiggleTag.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.