- January 25th, 2011
- Write comment
Recently both of my two big Visual Studio extension projects (Align by and Solution explorer tools) have started to reach a very nice state. A state where I’m happy with what it does and I can’t really think how to improve it. Especially the Solution explorer tools. There was always this bug in it that I was trying to get rid of and now that I have fixed it (with the help of Noah Richards and Matthew Johnson) I thought that I could be done with it. I don’t like adding features for features sake and everything worked well.
And then someone wrote something in a review which got me really excited. The Reviewer was Jason Schaeffer and here’s what he said…
It used to be a pain to make a specific change to multiple files in one project — every time I’d close a file, the solution explorer would jump to a different spot from where I needed it to be. Using the "Solution Explorer Tools", I can take control, choosing to highlight the active file in the tree only when I want. The "Collapse All" and "Collapse to Item" features are very useful too.
I wonder if it would be possible to have an "undo last collapse" button, so I can use the "Collapse to Item" feature to see where my active file, then put the tree back to being expanded the way it was.
An Undo feature! What a great idea! And the more I thought about it and how to implement it I realised I can extend the idea and make something even cooler. Saved states. How often have you done a lot of work in the Business layer then decided you need to work on your UI layer so you collapse all your business layer projects and open up your UI stuff. By saving state you could simply choose to view the “UI View” and Bam! there everything is as you want it.
And it’s the same logic as the Undo really, you’ve got to serialise the state and deserialise it. The only difference is you have to save that state to file.
As such I have a few new things to add to the Solution Explorer Tools.
– Undo (I’m thinking not just one either maybe 5 levels)
– Save state and load state – It’ll require a screen (which so far in my extensions I’ve managed to avoid) for management, though you shouldn’t need to open a screen to load a state.
It’s times like this I’m really glad I shared this project. This is a feature I would never have thought of by myself and I can see myself using it quite a bit. So thanks for the input Jason, expect a basic undo feature fairly soon and lots of exciting improvements in the near future.