CollectionTagger<ISquiggleTag>

SyntaxEditor for WPF Forum

Posted 5 months ago by SPF - Appeon
Version: 22.1.0
Avatar

In the marker set, there are multiple "taggers" in the same position. How can you draw only one line and the information displayed on it with the mouse down is complete.

Comments (5)

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

I'm sorry but I'm not entirely clear on your question. If you mean that you are attempting to hover the mouse over a position that has multiple tags covering it and generate a single QuickInfo session with all the merged descriptions, we don't have that functionality built-in.

You would need to have your logic that populates the CollectionTagger watch for overlapping ranges and if found, ensure that there is only a single tagged range for any given offset. 

As an example, if you have an identifier over offset range 10-20 and two tags would have covered that same range, just create the first range and append the description of what would have been the second tag's description to the description of the first.

I hope that helps!


Actipro Software Support

Posted 5 months ago by SPF - Appeon
Avatar

Looking at the picture, I realized that there are many diagnostic messages on "createscanner", some are errors and some are suggestions. But the line below should show a red error message line. Instead of multiple lines superimposing. How should this effect be achieved? You can see the comparison of pictures and how to achieve the effect in vs.

https://ibb.co/gT0nPBm

Posted 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

If you are displaying the errors with ParseErrorTagger via your document's ParseData value implementing IParseErrorProvider, then per the previous reply, you'd need to consolidate the IParseError instances when there are ones that cover the same text range.  Instead of returning two or more IParseErrors for the same text range, you could "wrap" those instances with another IParseError that would combine all the descriptions of the wrapped IParseError instances together.  And only that single wrapped IParseError instance would be returned for the text range.  That would keep a single squiggle line rendering and would allow the description for that squiggle line's quick info to display the description of both wrapped original IParseErrors.


Actipro Software Support

The latest build of this product (v22.1.2) was released 2 months ago, which was before the next post in this thread.
Posted 16 days ago by Sunshine - Appeon
Avatar

I have a suggestion, is it possible to set the display priority on IParseError? In this way, it is easy to achieve the desired effect of the user.

Scenarios with exactly the same range of diagnostic errors are relatively easy to handle if the merged approach is used.

But what if there are scopes interleaving? Things start to get complicated, processing display is only a superficial layer, more how to respond to other syntactic behaviors. If I want to get all the diagnostic information for a given location, the interleaved location processing is relatively difficult.
For another scenario, due to performance issues, we will compare results based on differences, and only add or delete diagnostic information for those differences. However, the merging operation undoubtedly greatly increases the complexity of this link.

If it is displayed according to the priority in the rendering process, the control user can easily deal with the problem of interleaving or overlapping.

Posted 16 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Taggers can be ordered within the tag aggregator we use to collect ISquiggleTags by implementing the IOrderable interface on your taggers.

What if we were able to enhance the SquiggleTagQuickInfoProvider to detect when there are overlapping squiggle tags and when it finds that situation, it would display all of the related parse error descriptions at that offset, stacked on top of each other, perhaps with a separator?  Would that solve the issue for you?

And if so, should the top item in the stack be the highest in rendering z-order and the squiggle visible in the view (last in the aggregated tags), or the opposite?


Actipro Software Support

Add Comment

Please log in to a validated account to post comments.