Eclipse like annotations bar for VStudio C++ - c++

I have been using Eclipse for a very long time and I have get used to some of its features.
Eclipse annotations bar, the small bar on the right hand side of editor in which all occurrences of a selected item and all errors are marked with tiny small line (Gray, Red etc.) has been very useful for me in Large codes.
Do we have any plugin for VStudio to do that in C++ editor?
Thanks

It seems "Microsoft Productivity Power Tools" is the only available option for Visual Studio 2010.
Microsoft Productivity Power Tools

Related

"Show code structure in the margin" with VS2017

The Productivity Power Tools for Visual Studio 2015 have a setting "Show code structure in the margin" (Options / Productivity Power Tools / Other Extensions) that, well, showed the code structure in the margin, at least for C# and some other languages, see this screenshot:
Left side is VS2015 with this option on, right is VS2017, both showing the same C# file. I’m referring to the blueish lines and half-ellipse-shaped things.
Now the Productivity Power Tools have been refactored for Visual Studio 2017, and I wasn’t able to turn this feature on. Is it still there, and if yes, how can I turn it on?
Looks like it's being rewritten to use Roslyn instead of the old API. A C++ version is already available. See also.

Feature "remove and sort usings on save" from Productivity Power Tools doesn't work in VS2017

Does anyone have problem with a feature "remove and sort usings on save" from Productivity Power Tools in Visual Studio 2017. It seems it doesn't work. Any solution for this?
There is another solution
Go to tool -->Option-->Text Editor--> tick/untick Remove Unncessary Using
**** For Visual studio 2019 (My version is Version 16.6.3): Productivity Power Tools didnt work and the experimental flag posted on #makdo's answer isn't available.
Credit to #mattferderer for this post
https://mattferderer.com/clean-up-sort-unused-dotnet-using-statements-in-visual-studio
How to get it working - V2019
In the menu go to Analyze > Code Cleanup > Configure Code Cleanup. Add the following to your fixers
Once you've configured code cleanup, you need to run it. Here are your options:
The first profile you've setup you can run with Ctrl+K, Ctrl+E.
On the bottom (leftish) of your screen there is a tiny broom icon. Click that.
In the menu go to Analyze > Code Cleanup. Then select the cleanup profile you want to run.
You can run code cleanup on save with Mads Kristensen's extension
There seems to be an issue with PowerCommands and ReSharper.
Please could you try unticking that checkbox "ReSharper | Options |
Environment | Keyboard & Menus | Hide overridden VS menu items" and
then check "Remove and Sort Usings on Save" feature once again.
From https://resharper-support.jetbrains.com/hc/en-us/community/posts/115000159930/comments/115000202364
**** UPDATE: The Productivity Power Tools are no longer necessary as this feature is now part of Visual Studio 2017. See makdu's answer. ****
I couldn't get the "Format Document on Save" or the "Sort and Remove Usings on save" features to work on 4 different laptops no matter which version of Visual Studio 2017 I had installed (Community/Pro/Enterprise). I think the issue is that I used the main Productivity Power Tools 2017 extension that installs all the extensions and perhaps this extension has a bug in it?
To fix the problem and get the features working:
Uninstalled the Productivity Power Tools 2017 extension. (This will leave all the sub-component extensions still installed.)
Uninstalled the individual Power Commands for Visual Studio extension.
Restarted Visual Studio.
Reinstalled the individual Power Commands for Visual Studio extension by itself.
Now the "Format Document on Save" and "Sort and Remove Usings on save" features work.

Visual Studio 2010/2012 Add-in Project Questions

I have already created a simple source code analyses tool for C/C++, but I wanted it to be an extension or tool for Visual Studio 2010 and 2012 editions. It is written completely in C++. For this reason I created it using "Create an Add-in using Visual C++/ATL" option. And then under "Choose Add-in Options", I have some problems. I don't know which one or ones to select. I want it to have a name and icon under Tools section, but on the other hand, my code analyzer can be used from command line too. If someone can advice me which option(s) to select there I would be glad.
My second question is this, when I have opened a source file in Visual Studio, and if I go to Tools -> MyAddin, and press it, I want it to do its job and analyze the code, and show the results in the output section below.
And my last question is that, if I have a C/C++ project with few files let's say, and if I right-click one of the files, I want to see my add-in and be able to execute the add-in from there, not to go always to Tools -> MyAddin. And also the same thing to work if I right-click the project, then it should analyze the all files and show the problems in the output section.
Please note that I have already created the source code analyzer tool in C++, and I have it as a DLL. I can also use it in Linux from terminal, and if I want I can also create a GUI for it, which I plan to do later. But I'm not that much experienced with Visual Studio, especially about add-ins, that's why I need your help. As you can see my first question is a kind of advice, but I think my second and third questions require some source code. I know that it is very hard for you to give me some help without seeing my code, but if you would help me somehow I would be glad.
For Visual Studio 2010 and 2012 you should consider using Extensions, not Add-Ins. It is a new technology introduced in Visual Studio 2010. Extensions come in form of a VSIX packages and are automatically installed in all applicable versions of Visual Studio. If you are not targeting Visual Studio version prior to 2010, I strongly recommend using extensions.
From this point of view, I will not answer any of your technical questions about Add-Ins. Here are a couple of links to start using extensions instead:
Anatomy of a VSIX Package
Building and publishing an extension for Visual Studio 2010
VSX FAQ
Walkthrough: Creating an Options Page
I think you will find valuable information on this topic here: Developing extension packages for Visual Studio 2005/2008/2010/2012 using C# with real-life samples

Visual Studio plugin for collapsing C++ codes

I want a Visual Studio plugin to collapse C++ code in visual. For example, I want to collapse the statements in a if block (as shown below). I know Visual Studio has the "outline" menu, but it doesn't seem to work well for me because it sometimes collapses macro defines and other things.
Does anyone know of a tool that can help me?
You need to enable this feature :
Tools -> Options -> Text Editor -> C/C++ -> Formatting -> check everything in "outlining"
Then, reopen the source file to reload outlining.
(PS. This works at least in Visual Studio 2008.)
I have been using Visual Assist X plugin for Visual Studio with great success. It can do what you are looking for and then a lot more.
Unfortunately this is not free software, but this is one of those developer tools that improve your productivity a lot and really worth paying for.

Static-code analyzer: unmanaged C++ Visual Studio 2008

I develop commercial unmanaged C++ app on Visual Studio 2008, and I want to add a static-code analysis tool.
Any recommendations?
I think it would be real nice if the tool can be integrated into MSVC.
I'm thinking about PC-Lint + Visual Lint
However, I have been taking a hard look at Coverity, Understand, and Klockwork as well.
Price isnt really the issue. I want opinions from people who actually used the tool for unmanaged C++ on MSVC, and they just absolutely loved it.
Lastly, VSTS and Intel Parallel Studio now also offer static code analysis. Nice~
Note: related post suggest Coverity is the best (?) (see last 2 posts)
Beyond all those you mentioned, VS Team Developer edition comes bundled with a nice static analysis tool called prefast. Its (obviously..) well integrated into the IDE, and accessible via the menus.
Its in fact a public release of an MS internal tool - a thin version of a tool called Prefix they run on their builds. Personally, when I faced the same decision, prefast sufficed.
I work for RedLizard building Goanna, a C++ static analysis plugin for Visual Studio. Its focus is on desktop use by a programmer. You can run it on individual files, just as you do the compiler, and it can give you results quickly.
There is a trial available. Right-click a file, select Run Goanna, and the results appear in the Visual Studio warnings list.
You can try CppDepend, a pretty complete c and c++ static analyzer, well integrated with VS 2008, 2010, 2012, 2013 and 2015.
I just started using cppcheck which I like very much due to the low noise.
Although it does not integrate directly with Visual Studio 2008, VS can be customized and you should be able to integrate it directly into the IDE.
I use PVS-Studio static code analyzer.
This static code analyzer good integrated with Visual Studio 2005, 2008, 2010, 2012, 2013.
It has many additional features:
Verification of files which were recently modified several days ago;
Verification of files by their filenames from within the text file
list;
version control systems integration; ability to operate fro m command line
interface;
«False Alarms» marking; saving and loading of analysis
results;
utilizing all available cores and processors;
etc...