Sins of a Solar Empire : Real-Time Strategy. Unrivalled Scale.
© 2003-2014 Ironclad Games Corporation Vancouver, BC. All rights reserved.
© 2006-2014 Stardock Entertainment

MetalMargin - MetalScroll for Visual Studio 2010

By on October 2, 2011 11:45:15 AM from JoeUser Forums JoeUser Forums External Link

kryo

Join Date 05/2003
+416

Having just recently transitioned to Visual Studio 2010 (finally) at my day job, I found myself in a bit of a predicament.

Previously we'd been using VS2005, for which there was a little extension called MetalScroll (based on another named RockScroll); this extension changed the scrollbar into an actual thumbnail of the code in the editor. For very large and complex files, this makes navigation considerably easier and quicker because you can learn the code's physical layout and identify important locations in the code by sight.

Unfortunately, as of VS2010 all extensions have to use WPF; MetalScroll was a Win32 extension and the author had no interest in rewriting it for the new version.

There are some other scrollbar replacements available for VS2010 (AllMargins by David Pugh, and the modified version of it which is included in Microsoft's Productivity Power Tools for VS2010).

 

StructureMargin

 

These have some nice new features, like showing a code preview tip window when you hover your cursor over the scrollbar, but none of them quite stack up to MetalScroll as far as navigation goes. AllMargins's included StructureMargin extension just shows an abstracted representation of code blocks and regions, while PPT's "full map" mode only renders every Nth line in large files, so the scrollbar image is not at all representative of the actual code layout.

Fortunately, while the source is not available for the improved version of StructureMargin that is included in PPT, the original one from AllMargins is. So this weekend, I decided to try my hand at tearing it down and rebuilding it into something approximating MetalScroll as closely as possible. Here's the result:

 

MetalMargin

 

I call it MetalMargin (very creative eh?). It retains some of the features from AllMargins that I liked (the code preview on mouseover), while removing and rewriting the abstract structure view into a direct physical preview, which uses your own VS color settings to draw the thumbnail.

It's available here if you're interested in giving it a try. I haven't tested it anywhere other than my home machine yet, so if you have a "clean" VS2010 environment which has not had 2005/2008 installed also, you may be missing some dependencies. YMMV

 

15 Replies +2
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
October 19, 2011 4:31:41 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Excellent, love your work so far! The closer to MetalScroll the better.

 

Bugs/requests:

- when installing MetalMargin, if CaretMargin, OverviewMargin etc. are already installed then the installer just says "Installation failed"

- I miss the MetalScroll feature to only highlight a word when double clicking it instead of single clicking

- it would be awesome to be able to change the color of the highlighted word in the text, right now it's very similar to my blue background color

 

Thanks, and keep it up! I will recommend this extension to all my coding colleges.

Reason for Karma (Optional)
Successfully updated karma reason!
October 19, 2011 8:31:12 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting HubertCumberdale,
when installing MetalMargin, if CaretMargin, OverviewMargin etc. are already installed then the installer just says "Installation failed"

I believe that's a limitation of the VSIX installer (it won't install over existing copies of the same version).

 

- it would be awesome to be able to change the color of the highlighted word in the text, right now it's very similar to my blue background color

This can be done in the registry (the AdornmentMatchColor setting, IIRC), just edit the included file and re-merge it. AllMargins didn't have a VS options screen of its own, but that's on the to-do list.

Reason for Karma (Optional)
Successfully updated karma reason!
October 21, 2011 9:35:17 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Genius!

I love this, please keep working on that. Most important thing to add IMO is an option to make doubleclick highlight a word, not singleclick as now (as the previous poster indicated).

If this takes off, you will have thousands of people downloading it and thanking you for that. So far IMO there has been no viable replacement of Metalscroll for VS2010. Productivity extensions were the best try, but they fall waaaay short.

Other things I'd love added (apart from doubleclick highlighting - this by way most important for me):

- Ability to change highlight color without tweaking the registry

- Better rendering of text in scrollbar (not just meaningless fat lines but the real thing downscaled)

- Display of highlighted item inline in text in scrollbar

 

Reason for Karma (Optional)
Successfully updated karma reason!
October 30, 2011 11:26:39 AM from Elemental Forums Elemental Forums

New version now available here. Refactored everything into just one vsix so it doesn't have install conflicts with AllMargins, and added in the options screen for all of the colors that are not pulled from the VS text color options already, as well as some configurations for the thumb (toggle the different colors on or off and configure which keywords get colored). An option for double click caret highlight is there but remains NYI for the time being.

Reason for Karma (Optional)
Successfully updated karma reason!
November 5, 2011 2:11:26 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Nice, keep up the good work!

Reason for Karma (Optional)
Successfully updated karma reason!
December 14, 2011 5:05:57 AM from GUIChamps Forums GUIChamps Forums

My top request (apart from the NYI double click feature): show breakpoints and bookmarks in the margin.

Cheers.

Reason for Karma (Optional)
Successfully updated karma reason!
February 8, 2012 4:22:40 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Just wondering, how do you remove this from VS? There doesn't seeem to be an easy way of doing so.

Great work BTW.

Reason for Karma (Optional)
Successfully updated karma reason!
February 8, 2012 6:54:07 AM from Stardock Forums Stardock Forums

It can be uninstalled from the Extension Manager in VS2010, same as any other extension.

Reason for Karma (Optional)
Successfully updated karma reason!
February 8, 2012 7:50:18 AM from WinCustomize Forums WinCustomize Forums

 My question is ... what exactly is it used for? I'm totally ignorant when it comes to this sort of thing.

Reason for Karma (Optional)
Successfully updated karma reason!
February 13, 2012 5:18:22 AM from GUIChamps Forums GUIChamps Forums

Just read the presentation at the top..? For large source code files it's really really useful to get an overview of the code and to see where in the code a certain variable is used without having to search.

 

Can't wait for the next version, keep it up kryo!

 

Reason for Karma (Optional)
Successfully updated karma reason!
December 20, 2012 4:14:46 AM from GUIChamps Forums GUIChamps Forums

Hi,

could you provide some link to the source of this extension? Or at least provide some information how can be turned off/change the color of highlighted line?

 

Best regards.

Reason for Karma (Optional)
Successfully updated karma reason!
December 20, 2012 7:19:35 AM from Stardock Forums Stardock Forums

Everything that doesn't just inherit from the VS text color settings should be in the MM options.

Reason for Karma (Optional)
Successfully updated karma reason!
December 20, 2012 8:06:46 AM from GUIChamps Forums GUIChamps Forums

Thanks for quick response.

Reason for Karma (Optional)
Successfully updated karma reason!
March 15, 2013 4:15:59 AM from Stardock Forums Stardock Forums

Sorry to bother you again, but I've started using Visual Studio 2012 in my day job, and I couldn't find appropriate replacement for MetalMargin. Do you have plans to release version for vs2012, and when would it be?

 

Best regards.

Reason for Karma (Optional)
Successfully updated karma reason!
March 15, 2013 4:50:47 AM from WinCustomize Forums WinCustomize Forums

Quoting zytane,

Sorry to bother you again, but I've started using Visual Studio 2012 in my day job, and I couldn't find appropriate replacement for MetalMargin. Do you have plans to release version for vs2012, and when would it be?
Best regards.

 

+1

Can I add my support for this request too?

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108431  walnut1   Server Load Time: 00:00:00.0000547   Page Render Time: