Async TaggerProvider

SyntaxEditor for WPF Forum

Posted 8 years ago by gareth
Version: 16.1.0633
Avatar

Hi there, 

How do you get TaggerProvider services (TextViewTaggerProvider, CodeDocumentTaggerProvider, etc) to run asynchronously (so to not block the main UI thread)?

Kind regards,

Gareth

Comments (1)

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

Hi Gareth,

Tagger provider language services just create taggers for use with the document/view.  The taggers' GetTags methods are called synchronously by their callers since they are called during line layout.  You could probably update tagger data within them asynchronously and then notify via TagsChanged if there was an update and trigger a new GetTags call.  If you do that, you might want to have a snapshot approach where while loading new data async, you are still returning old data.  Then once the new data is fully loaded, flip over to returning that instead.


Actipro Software Support

The latest build of this product (v24.1.3) 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.