Update squiggle line based on specified delimiters

SyntaxEditor for WPF Forum

Posted 8 years ago by James Zheng
Version: 16.1.0630
Avatar

Hi Actipro,

Is there a way to force the squiggle line tagger (derived from TaggerBase<ISquiggleTag>) to update the lines that are not being edited, based on specified delimiters ';' ?

Please refer to 'AdornmentsSquigglesIntro' in the sample project for the implementation of the squiggle tagger.

For example:

a = 1;

b = 1

c = 1

d = 1

e = 1;

If line 'c = 1' is modified, line 'b = 1', line 'd = 1' and line 'e = 1;' are called by GetTags(...) in the squiggle tagger class to update the squggle line display, as these lines are within the same pair of delimiters ';'  (starting delimiter in 'a = 1;' and ending delimiter in 'e = 1;').

Currently, only the line being modified is called to update the squiggle line display.

I've a use case whereby the correctness of one line affects the neighboring lines within the same pair of delimiters ';'

Regards,

James Zheng

[Modified 8 years ago]

Comments (3)

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

Hi James,

That particular QuickStart shows how you can respond to a change on a line and render adornments like squiggles.  It is just updating lines on-the-fly as they are redrawn since it inherts TaggerBase.  If you use a collection tagger instead, you would be specifying all the ranges upfront in a collection instead and that might work better.

Still, if you are doing some form of parsing check, you probably want to be using our parsing mechanisms instead of the above.  Parsers have the ability to specify parse errors in their parse data that is returned (see the documentation on all this).  You can have the parse errors automatically get squiggle lines applied to show where the parse errors are and even have them provide quick info on mouse hover.  Based on what you are describing, it seems like that might be a better way to go.


Actipro Software Support

Posted 8 years ago by James Zheng
Avatar

Hi Actipro,

Thanks for the advice. The CollectionTagger seems to be the best solution for me.

Could you briefly describe how the tags are set upfront? Any sample projects?

Regards,

James Zheng

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

Hi James,

Several of the QuickStarts in the Sample Browser use CollectionTagger.  If you do a search for it, you can find them, such as in "AdornmentsIntraTextNotes".


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.