views:

205

answers:

3

I'm writing an add-in for extending Visual Studio 2008 (adding custom functionality). While doing that I came across a situation where it would be good if I could provide custom messages via tooltips for any line of code.

Doing this IMO requires accessing the VS editor control and by some way displaying the respective tooltip. This might also be visualized like breakpoints that on mouse hovering provide a tooltip message.

Is this implementation possible? If yes, what's the way to go? If not, what similar way do you suggest?

+1  A: 

In a recent episode of Hanselminutes, they discussed how much more extensible the VS 2010 editor is going to be. Based on what they said, I think it will be rather difficult (although probably possible) until they introduce that extensibility.

JosephStyons
Any other similar ideas on doing that?
A: 

You should take a look at Resharper and work out whether your add-in would be better suited to being a Resharper Plug-In. This approach would require your uses to buy Resharper, but this sort of thing is exactly what it does.

For example, check out http://stylecopforresharper.codeplex.com/ where this sort of hint/tooltip stuff in Resharper is used to highlight lines of code that have StyleCop issues.

Martin Peck
+1  A: 

Yes it is. You can add more customization on the code editor of VS 2008, even you can create your own language service with your own intellisense support in VS 2008.

You can do this simply by using VS 2008 SDK, and you can also quickly play with the standalone shell of Visual Studio 2008, and MS SQL Server 2008 Management Studio is one example of customized Visual Studio standalone shell.

You can visit MS Visual Studio Extensibility:

http://msdn.microsoft.com/en-us/vsx/default.aspx

And lots of videos on VS 2008 SDK:

http://msdn.microsoft.com/en-us/vsx/bb507746.aspx#extensibility

eriawan