Visual Studio Extensibility: edit the undo list - visual-studio-2010

i'm trying to write a VS extension to solve this thing and somehow exclude the outlining from undo/redo stack.
is there a way to intercept the insertion of a new undo item? i mean stop it before it is being added?
if not - can i get the list of undo items and edit it to remove those 'collapse' items?

Related

Hide TODO tag in Visual Studio Task List

Our codebase has a bunch of TODO comments that no one will ever fix and that the boss refuses to remove.
I would like to hide the TODO's from the Visual Studio task list and just show my custom MEDO tags.
It appears that Visual studio will not let you remove the TODO tag from the task list. The remove button is grayed out for TODO. (You can remove all the other default tags, just not TODO.)
Does anyone know some kind of hack or something that will allow me to remove them anyway? Maybe editing some config file somewhere?
As you've discovered, Visual Studio won't allow you to modify the TODO token, but you can trick it by using the Priority settings to filter it out.
First, set your MEDO token to "High Priority" as shown here:
Then filter the Task List window to only show high priority items. (The filter button is hard to see on that column - you may need to widen it a bit.)
By default, Visual Studio includes the following tokens: HACK, TODO, UNDONE, NOTE.
All you need to do is to remove the TODO from these list of predefined tokens. (you can create your own tokens as well)
On the Tools menu, choose Options.
Open the Environment folder and then choose Task List and then delete the TODO token.
So now you will continue to have TODO comments in your codebase but they will not show in your task list.

Visual Studio 2013 Hide Notification Button

I have a question about Visual Studio 2013.
I just installed it and it seems pretty good because of the new features.
But there is something I do not like:
Is it possible somehow removing these 3 x buttons ? Or just one of them?
Yes you can hide them.
Close Visual Studio.
Open regedit and find MainWindowFrameControls.
For example I want to remove:
1) Sign In
2) Notifications
So I need to delete:
{304ee989-b7c9-46c8-aa48-f080bc47cee0}
{73988e61-7e30-4e87-b891-23b5e460db21}
You can also delete them and it will work (you can remove feedback also by this way).
Although sometime VS recreates that keys. But solution is very easy - instead of deleting make right click and go to Permissions, add Everyone - Deny - Read. So now nobody will be able to read that keys including VS.
You can remove it to go to original state by the same way.
At the moment the social features don't seem to have any corresponding options you can use to disable them.
There is a method that relies on using Visual Commander extension to repeatedly hide some of the buttons (as Visual Studio
often recreates them), which seems like the closest you'll get for the moment.
http://visualstudioextensions.vlasovstudio.com/2013/10/19/hide-sign-in-and-feedback-buttons-in-the-visual-studio-2013-main-window/ - You can view the code in the "Extensions" section.
Unless you're desparate to get rid of them, you're probably better of trying to ignore them, hopefully an option to hide them will become available.
You can use the Disable Social Features extension, which will programmatically hide both the 'smiley' buttons as well as your own name/photo from the front of Visual Studio.

How can I add a note to a Visual Studio bookmark or line?

When I am in the middle of debugging I often find more than one area that can be improved (or fixed) and I like to mark them in such away that I can come back later and make the improvement.
Currently I add a bookmark to the line but this can't include any notes that can be used to remind me why the bookmark was there (you can change the name of the bookmark but this isn't enough). I suppose I really want to be able to add a TODO to the code while the code is running but although Edit and Continue is enabled it is not available in the ASP.NET WebForms (3.5) project.
Are there any Visual Studio features or extensions that will enable this?
Instead of enabling Edit and Continue then entering a TODO: into the source code, you can create a Task List Shortcut (key cord Ctrl + K, Ctrl + H).
This adds an entry to the Shortcuts section of the Task List window. From there you can change the description of the task to remind you why you created it.
Due to the fact the answer marked as accepted has been deprecated in VS 2015 onwards, I used this solution instead:
Bookmark a line of code using the key cord Ctrl+K Ctrl+K, then open the Bookmarks window (Ctrl+K Ctrl+W). In the Bookmarks window you can rename your bookmarks to whatever you please.
I have tested this in both VS 2015 and 2017 (Community).
IMPORTANT NOTE: Make sure to File->Save All (Ctrl+Shift+S) every once in a while so you don't lose the bookmarks you've been working on if VS or Windows decide to crash. I have fallen victim to this and it is painful.
The Edit and Continue feature will let you make simple changes to your code while debugging. If you your change is simple enough then you can make the change on the fly while coding. For more complicated changes, you can add a TODO comment of the form:
// TODO: Explanation of fix
You can see a list of all TODO comments by looking at the task list within Visual Studio.

Clean pending changes "ADD" in VS2010 TFS 2010

Is there way to clean up pending changes with "Add" value in column "Change" . They seem to be related to open solution according to folder path, but not present either in the solution or file system. Pressing "Filter by solution" actually doesn't show them and shows "Delete" for other files in unrelated projects which is also confusing. There were manipulations to move solutions to other root folders which could contribute to that. All those solutions are not really used, so any possible undo will do :), but not clear how to purge all those dirty entries from pending changes window.
Can you just click the Change column header to sort by Change type, highlight all the Adds right-click Undo.

Silly Visual Studio Pending Changes Question

I recently switched from a Java based project to a C#/.net project. I previously used IntelliJ which had the concept of change lists where you could group your pending changes together and check each group in individually.
I have two problems with the pending changes window in visual studio.
1) Every time I check anything in, visual studio checks the checkbox beside Every pending change in the list forcing me to uncheck each and every one of them so I don't accidentally check something in. This is extremely frustrating because there are several files that I need to keep changed to correctly run my code locally. Is there any way to change this default behavior to not check any pending changes on check-in?
2) Is there any way to group changes into lists as opposed one big bucket of changes? Again this becomes frustrating when I need to check something in, but I have to search through the files and check the pertinent changes. I understand that shelve sets exist using TFS, but that doesn't cut it for me, especially since I have several changed files that I need to keep altered in order to correctly deploy locally, and I rarely ever want to check in.
Thanks in advance!
I have to manage lots of changes every day in Visual Studio, and I've got a few tips for you, but no silver bullet:
Use Ctrl+A to select all items and then press a checkbox to toggle the checkboxes for all items. This can be useful when performing changes to only a few items -- just uncheck everything, then make sure you have only the items checked that you'd like to update.
Use Ctrl+Click (then right-click) to 'Undo' selected changes. By default, the undo action will only apply to the selected items.
You might want to experiment with using multiple Workspaces -- and then filtering changes by workspace or by solution.
No, I don't know of a way to fix your problems. It sounds like the best answer would be to refactor your configuration settings or code so that you can check in all of your changes.
If your changes are in different projects you can partition what you check in using the Source Control Explorer by right clicking on the project folder and checking in that way. It will auto check only the files in the folder you right click on. Just keep in mind the Source Control Explorer gives you some other options. Otherwise, I do not know of a way to manually control your change sets file-by-file thought if this exists I would like to know about it too.
You can also use Ctrl+A to select all items and then press Spacebar to toggle the checkedboxes as checked/unchecked.

Resources