Posted 14 years ago by Greg Shaffer - Boulder
Avatar
Hi Again,

I have a tooltip-on-hover feature for my code editor. I recently added snippets, which have their own hover tooltip. When I hover over a token in a snippet, both tooltips appear (the one for the snippet and the one that I show).

Is there a mechanism to determine if a token belongs to a snippet? If so, I wish to check for the snippet state and NOT show my tooltip as the snippet tooltip is sufficient.

Thanks,
Greg

Comments (5)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
You can see if there is a CodeSnippetIndicator that encompasses the text. That's probably the easiest way. So look at the Document.Lines[yourlineindex].Indicators for that.


Actipro Software Support

Posted 14 years ago by Greg Shaffer - Boulder
Avatar
What is the easiest way to get the line number of a token?
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Document.Lines.IndexOf takes an offset so you could pass the offset of the Token.


Actipro Software Support

Posted 14 years ago by Greg Shaffer - Boulder
Avatar
Is there a way to get the range of offsets an indicator encompasses?

I need to make sure the token is in the indicator's bounds.

Thanks,
Greg
Posted 14 years ago by Greg Shaffer - Boulder
Avatar
Nevermind!

I found it. Hey thanks for all the help!

Cheers,
Greg
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.