IntraLine adornment (like CodeLens)

SyntaxEditor for WPF Forum

Posted 10 years ago by Malcolm Stockham
Version: 14.1.0602
Avatar

I would like to add some IntraLine adornments to the editor in my application, along the lines of the CodeLens. Where an adornment is inserted between lines of text without affecting the usual editing functions.

Is this something that can be achieved in the current release?  

Many thanks,

Malcolm

Comments (6)

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

Hi Malcolm,

Thanks for the suggestion.  We don't currently have that feature but I will mark down the suggestion.  If you have any ideas on what sort of language service interface would be used to provide the additional vertical spacing for the line, please let us know.


Actipro Software Support

Posted 10 years ago by Malcolm Stockham
Avatar

Thanks for adding this to the sugestion box - I think it could add some real value to our user experience.

I am still relatively new to the Tagging API, but my initial instinct would be to tag a range or line (in much the same way as IIndicatorTag) which then implements some form of CreateGlyph equivalent which gets inserted between the viewlines.  I'm not sure how this would work if multiple tags implementing such an interface were on the same line - most likely an edge case but theoretically possible - just stack the annotations vertically maybe?

Alternatively, it might tie in nicely with the Outlining interfaces.  The block I would like annotate is already decorated with an IOutliningNodeDefinition.  As I am already generating this from my ParseData all the information I require is to hand when I an adding these nodes.  It would seem likely that an outlined code block is exactly the sort of thing you would want to annotate with some intra line adornment.

[Modified 10 years ago]

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

Hi Malcolm,

I don't think it should be tied to the outlining mechanism since there might be other cases where you want to display adornments around other non-outlined lines.  Although I do agree, in general there will be a lot of overlap there.

I agree that tagging a range via a new special line-based adornment tag would be the way to go.  And we would need to support the potential of multiple adornments on the same line.

Say that you have a tag range that covers a method, which is over 3 lines.  If your tag says the adornment should be above the line, that's fine and it would reserve space above the top line.  But if the tag says the adornment should be below the line, would it be below the first line or below the last line?  I'm thinking that it should be below the bottom line of the tagged range in that case.  Do you agree?


Actipro Software Support

Posted 10 years ago by Malcolm Stockham
Avatar

It would seem reasonable to me that the range describes the extent of the adorned block so adornments should be positioned above the first line or below the last line.  If you particularly wanted an adornment below the first line you could achieve it by tagging only the first character in the block, but this seems a far less likely scenario than the other two.

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

Hello,

We just started a new forum thread that we are pointing all the customers interested in an inter-line adornment feature (like CodeLens) towards:

https://www.actiprosoftware.com/community/thread/23745/inter-line-adornments-like-vs-codelens-brains

Check that out and please give any appropriate insight. Thanks!


Actipro Software Support

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

We have the intra-line adornments feature wrapped up and ready to go for the upcoming 2017.2 version. It has two new related samples, one for a Code Lens like UI and one for a Peek Definition like UI.


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.