Is this the right way to disable error squiggles?

SyntaxEditor Web Languages Add-on for WPF Forum

Posted 8 years ago by Craig - Varigence, Inc.
Version: 11.1.0542
Avatar
Using the XmlSyntaxLanguage, I don't see a Unregister function to disable error squiggles. Based on your samples, it seems like one option would be:

var codeDocumentTaggerProvider = _syntaxLanguage.GetService(typeof(CodeDocumentTaggerProvider<ParseErrorTagger>));
var squiggleTagQuickInfoProvider = _syntaxLanguage.GetService(typeof(SquiggleTagQuickInfoProvider));

_syntaxLanguage.UnregisterService(codeDocumentTaggerProvider.GetType());
_syntaxLanguage.UnregisterService(squiggleTagQuickInfoProvider.GetType());
I see that this works but I'm wondering if there's a more direct / simpler approach that I'm missing. Also, are there any potential side effects from using this approach? (am I disabling other things that I may not intend to disable?)

Thanks,

-Craig

[Modified at 05/14/2011 07:03 PM]

Comments (1)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

I think these lines would probably do the trick:
this.UnregisterService<CodeDocumentTaggerProvider<ParseErrorTagger>>();
this.UnregisterService<SquiggleTagQuickInfoProvider>();
You may want to keep SquiggleTagQuickInfoProvider on there though if you provide your own squiggle tags and need quick info for them. In that case, just use the first line.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.