Reputation: 42593
Is it possible somehow to color specified code in specified color in any version of visual studio? For example, make background of
if( VERIFY( ... ) )
green and background of
if( ! VERIFY( ... ) )
red? Maybe some addon exists or some version of visual studio has such functionality?
Upvotes: 1
Views: 793
Reputation: 7389
NO PLUGIN NEEDED
According to MSDN and this tutorial, you can set user-defined keywords for syntax highlighting in a
usertype.dat
file, which you should save in the same directory as Visual Studio's msdev.exe
, or devenv.exe
for VS.NET.
Now restart Visual Studio. Then in VS you can set the font properties for those keywords.
Edit: BTW, see the download here for a predefined usertype.dat with a lot of keywords ready to use.
Upvotes: 4
Reputation: 21615
You can use Resharper's "ToDo Items" to accomplish this.
Upvotes: 3
Reputation: 82507
According to the VS Extensibility form Moderator, Ed Dore, it is not possible:
http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/93fc6d61-cfdb-432d-8541-d7dce498cef5/
Unfortunately, no. The code implementing the document tabbing was developed with native Win32 code, and currently doesn't have any VS SDK or automation hooks into it.
It is too bad as this would be beyond useful. (Keep track of different types of files and such.)
Upvotes: -1
Reputation: 69282
I don't know of an existing addin that does anything like that but I do know that Developer Express, the company that makes CodeRush, makes the addin engine freely available as a product called DxCore. This makes is much easier to create an addin that decorates the Visual Studio text editor. In Visual Studio 2010, a lot of the extremely difficult code that DxCore abstracts is no longer necessary as there is an official extensibility model for decorating the editor.
Here's a link to some DxCore plugin samples on Google Code.
Upvotes: 3
Reputation: 55172
No, but you may be interested in FxCop, it's more elaborate, but it should allow you the ability to detect the case you're talking about (via a custom rule, if it doesn't exist). It may be more work to set up, but it's worth it (especially if work in a team, and/or, have an existing CI system).
Upvotes: 0