Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VS2005 Plugin with custom tooltip in c# code

0 views
Skip to first unread message

Daniel Amesberger

unread,
Nov 15, 2005, 10:17:41 AM11/15/05
to
Hi,
I'm currently working on a VS.NET 2005 plugin, and I need to show a custom
tooltip info in the C# code window, similar to the parameter info which is
displayed when typing a function name and bracket open.
Is there a way to do this?

Here is another problem: I managed to listen to the
EnvDTE80.TextDocumentKeyPressEvents event, but is there an event for
listening to selection changes, when the user moves around the cursor?
SelectionEvents.OnChange only fires when selecting another file in the IDE.

Thanks in advance!

greetings,
Daniel Amesberger


Gary Chang[MSFT]

unread,
Nov 16, 2005, 8:03:08 AM11/16/05
to
Hi Daniel,

>I'm currently working on a VS.NET 2005 plugin, and I need to show a custom
>tooltip info in the C# code window, similar to the parameter info which is
>displayed when typing a function name and bracket open.

It appears you need a custom text marker to display the tooltip with C#
code, A text marker is a floating range of text in a buffer that can affect
the display and behavior of a region of text. Markers include breakpoints,
bookmarks, wavy underlines, and read-only regions. Please refer to the
corresponding VS Environment SDK doc and the follwoing Dr. Ex's WebLog
article:

How to: Create Custom Text Markers
ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.VSSDK.v80/dv_search/html/6e32ed81-c60
4-4a32-9012-8db3bec7c846.htm

How do I implement a custom Text marker?
http://blogs.msdn.com/dr._ex/archive/2004/06/09/152220.aspx


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
--------------------
Get Secure! :C www.microsoft.com/security
Register to Access MSDN Managed Newsgroups!
http://support.microsoft.com/default.aspx?scid=/servicedesks/msdn/nospam.asp
&SD=msdn

This posting is provided "AS IS" with no warranties, and confers no rights.

Daniel Amesberger

unread,
Nov 16, 2005, 9:06:06 AM11/16/05
to
Thanks!
I currently solved that using some API calls, and it works very well.
The custom text marker seems to be the better solution, I'll take a look at
it.

Another question:
I'm listening to the OnBuildDone event, and do some script creation there.
When an error occurs I'd like to add it to the error list.
Is there a way to do that? I can only access the task list, but the error
list is read-only...

best regards, Daniel

""Gary Chang[MSFT]"" <v-ga...@online.microsoft.com> schrieb im Newsbeitrag
news:DuZsb4q6...@TK2MSFTNGXA02.phx.gbl...

Gary Chang[MSFT]

unread,
Nov 17, 2005, 3:50:57 AM11/17/05
to
Hi Daniel,

>When an error occurs I'd like to add it to the error list.
>Is there a way to do that?

I am afraid there is no way to do this from an add-in in VS 2005, we will
improve the Error list support through DTE interfaces in the nexe version
of Visual Studio.

For the issue about how to listen to the selection changes in text editor,
I suggest you take a look on the IVsTextViewEvents::OnChangeCaretLine to
track changes between lines. But there may no be a mechanism to detect
column changes.

0 new messages