Partager via


Future Focus: Document Map Margin

We are continuing our series of posts about proposed features for the next version of Visual Studio. This post focuses on a new feature called Document Map Margins (DMM). Developers frequently work with huge source files that are difficult to navigate. The proposed DMM feature is designed to make it easier for you to find and track important features in your code and to visualize the overall structure of your file.

We are currently considering introducing two different views of your code. One might be called the Marker Bar view. It would be meant to help you find key areas in your code, such as breakpoints, errors, bookmarks, search results, etc. A second view, called thumbnail view, might present the developer with a condensed overview of the entire document. Both features are shown in Figure 1.

 

DocumentMap

Figure One: The proposed Marker Bar View is shown on he left, and the proposed Thumbnail View is shown on the right.

Please remember that Future Focus is designed to give you an overview of proposed features about which we would like to get feedback. We are not promising that any of these features will be part of the product, and these features may change substantially if they are released. The goal of this project is to give you a chance to comment on proposed features, letting us know if you think they are worthwhile, and whether you think our proposal is well designed. In this particular project, we are not looking for overall comments on the future of Visual Studio or the C# language, but rather comments on the Document Map Margin feature.

Please comment in the Future Focus release area outlined below in the resources section, rather than appending comments to this post. Thank you for your support and your interest in our .NET languages.

Resources

kick it on DotNetKicks.com

Comments

  • Anonymous
    August 15, 2008
    You've been kicked (a good thing) - Trackback from DotNetKicks.com

  • Anonymous
    August 15, 2008
    Thumbnail view would be really nice. Key would be how resource hungry the implementation is. Why not display it as popup so it doesnt take up real estate as well?

  • Anonymous
    August 15, 2008
    I've used RockScroll in Visual Studio in the past, and while I liked it, I eventually uninstalled it because it had problems with collapsed Regions. I think a feature like this would be useful in Internet Explorer and Word.

  • Anonymous
    August 15, 2008
    bout time. visualization and tracking tools are the last frontier for efficient coding. such as, how bout a preview for the content of a method... or a way to backtrack to your previous point after drilling into a method to view its code. lots of room for improvements in these areas.

  • Anonymous
    August 15, 2008
    Please just allow outlining on {} like c++.  It helps manage large for, if, and while statements.

  • Anonymous
    August 15, 2008
    Charlie, I hope you guys make the gutter bar on the right extensible, so that plugin makers, like JetBrains (makers of ReSharper) who were early adopters of this UI paradigm do not get left out in the cold.

  • Anonymous
    August 15, 2008
    The first thing I install after VStudio is RockScroll - I can't work without it any more.  Putting it directly into the IDE and improving its ability to work with regions would make me a very, very happy person

  • Anonymous
    August 16, 2008
    Much more useful navigation feature would be to fix the existing navigation features like going forward/backward using mouse thumb buttons and media keys in the keyboard. Currently it ranges from broken to random, try using them in a c# project (ide config to C# settings), then configure the IDE to use c++ settings and use them in c++ project. And even when they appear to be working sometimes, 10% of the time they don't work properly - clicking on the back navigation in IDE does sometimes different things and sometimes not. For best chance of noticing the random workings, use the Find feature along with other ways of navigating the code, then trying to use back/forward mouse buttons often between there.

  • Anonymous
    August 16, 2008
    i want to use this opportunity to suggest a different productivity enhancement in vs next. we might have an automatic error-fix like it is implemented in eclipse. it could add missing ; or add casts etc. this can be extended to runtime errors as well e.g. adding checks for null on a nullrefexception. the key for autofixes would be that they can be applied quickly. otherwise typing them manually would be quicker.

  • Anonymous
    August 16, 2008
    This is simply great - I know that feature from Eclipse - but the document overvoiew is a great additional idea. A a programmer I know where my code parts are - to scroll very fast there is a very good feature!!!

  • Anonymous
    August 16, 2008
    I completely agree. Five or six years ago, I used some IDE which had that thumbnails view, and it really made life super-easy. It's one of the features I actually miss in visual studio.

  • Anonymous
    August 17, 2008
    The comment has been removed

  • Anonymous
    August 17, 2008
    Thumbnail View will be brillient for navigation.  Marker Bar will be helpful but reminds a bit of beyond compare, one possible enhancment when you click on the marker it shows a ballon with a snippet of code where the marker is set, saving you a heap of time scrolling to it. Nice Work

  • Anonymous
    August 17, 2008
    Anything that will standardize RockScroll has to be a great thing!

  • Anonymous
    August 18, 2008
    Wouldn't it be better to teach people e.g. refactoring? I shiver when I hear "work on huge source files" or "manage large for, if, and while statements". Guys, before you ask for tool support to help you manage your own mess and thereby let you go on with your erroneous ways, please sit down and learn proper software engineering/development principles.

  • Anonymous
    August 18, 2008
    I have to agree with Eirik M--and it's hard to believe it took over two dozen comments before someone said this. Making tools to manage large source files misses the point: WHY do such files exist in the first place, and what can be done to make them smaller.  That should be the focus, not providing tools to make it easier to continue bad habits.

  • Anonymous
    August 18, 2008
    This is a good idea but you are building it on top of a broken paradigm. Before you guys do anything like this you need to 'fix' designers. *** Designers should be able to 'spawn' dynamic tool windows to address views *** The design surface in the class designer is a perfect example. Outside of platform constraints there is no reason to have to dynamic 'properties' designer on the bottom of the main visual designer. This 'properties' designer should be a tool window and end users should be able to position them in the tabs and docks accordingly. Adding a thumbnail view on the designer is great. Mashing onto the right hand side of my code editor... not so great. Fix the real problem. Then build great tools on top of it.

  • Anonymous
    August 18, 2008
    The comment has been removed

  • Anonymous
    August 18, 2008
    I like marker bar view.  Strikes me as sitting somewhere between the object browser and class view. Marker bar view could be useful in cases where you've inherited a large source file and are manually tracing through certain code paths to figure out how the object works.  Right now I use a combination of "Go To definition" (F12), "return to last position" (ctrl+_) and low tech pencil/paper but might rely more on bookmarks if I had a more visual way to navigate them (e.g., "I just came from the bookmark a few inches above this one, so I'll click on it to jump back). I'm always on the lookout for ways to replace paper with electrons so a helpful addition would be annotated bookmarks.  Marker bar view could use a tooltip to display the annotation when the cursor is hovering over the bookmark.  Annotation sounds too technical; I could even go for displaying the nearest comment when hovering over the bookmark. Not sure about thumbnail view.  It's a bit wide - for me that means it'll compete with solution explorer/class view/resource view/macro explorer for space.  I'm also not sure how valuable thumbnails of source code are - are they large enough to be legible? Thumbnail view could be useful for fixing compilation errors and warnings.  It's wide enough to provide a little context and would be a convenient way to quickly fix errors arising from a single source (e.g., I add a parameter to a method, this breaks everything that's calling that method).  Right now this can be done from task list but it's horizontally oriented - a vertically oriented way to do this might get more usage. Would be nice to have these integrated with keyboard shortcuts for traversing each of the elements called out by the various bars.

  • Anonymous
    August 18, 2008
    The comment has been removed

  • Anonymous
    August 18, 2008
    The comment has been removed

  • Anonymous
    August 18, 2008
    The C Sharp Programming Language it's Powerfull And Easy Thanks

  • Anonymous
    August 18, 2008
    Thank you all for replying. I want to remind you that it would be best if you commented on this on Code Gallery. See the post above for the link. We just want to make sure the IDE team members see your comments. I do, however, read carefully what you write here, and will try to find time to make some kind of thoughtful response in the next few days.

  • Charlie
  • Anonymous
    August 21, 2008
    Resharper has a marker view like that.  Could you please work with Jet Brains so that their tool would play nice with the VS version.  I actually think I would get more out of the VS Marker View than I get out of the Jet Brains similar tool, but it would be nice if they both shared that space in an elegant fashion.  It would be helpful if with a right-click context menu I could swap between them - I definitely wouldn't want to look at both at the same time! Also I can think of something more fundamental to aid me in navigating a long page -- PLEASE allow Regions in HTML Code View like you have with C# or VB.NET code view.  The only thing I've got right now (at least it's something) is I can collapse all tags in HTML, but that can be a pain.  Also, I think you should promote Outline Collapse To Definitions as a default button on the toolbar - I think the notion of using Regions and initially viewing code collapsed should be promoted/encouraged instead of buried with other Outline actions that after years of using Visual Studio I still can't seem to find use for.

  • Anonymous
    August 21, 2008
    Also please let us have Regions in web.config.

  • Anonymous
    August 21, 2008
    I will probably not use that feature because The only thing I need is two keys to jump to the next/previous feature (method / variable / constant). VB6 had this feature (in 1998?). I use regions to group features, typically: #region Construction #region Properties #region Commands #region Implementation #region Implementation data With CTRL+M M you can expand / collapse the regions, this provides reasonably quick navigation. Best regards, Jan Jansen

  • Anonymous
    August 25, 2008
    The comment has been removed

  • Anonymous
    August 25, 2008
    This looks very much like one of the Resharper items. If this new feature is developed in conjunction with JetBrains, it is to be welcomed. It could show the positions of errors in the code, FXCOP gripes and StyleCop moans.

  • Anonymous
    August 27, 2008
    The comment has been removed

  • Anonymous
    August 28, 2008
    Like few others here I would ask for other functionality but this. We should try to help people write better and more maintainable code and not give them tools to write bulkier and harder to maintain code. Working on large files is a classic smell of bad quality code. People two write 20 page if statements or 100 case switch statements. Please spend time to write better refactoring tools and make the IDE faster. The more tools you give to write messier code the more messier the code will be.

  • Anonymous
    August 29, 2008
    It will be great if images and diagrams could be imported as part of a comment to illustrate how a particular function or code work (which could auto hide or collapsed like a #region). This can help navigation of the code rather than have to decipher the loops and hoops.

  • Anonymous
    September 04, 2008
    In the old skool days of the C64 (Commodore 64 that is), there was a text editor that started to scroll when the cursor was a few characters from the border instead of when the cursor was at the border. This I really liked because now I often scroll too much and then back so I can see the context.

  • Anonymous
    September 17, 2008
    boomhauer said: "how bout a preview for the content of a method... or a way to backtrack to your previous point after drilling into a method to view its code" You can do both of those things already in VS2005-2008.... Code Definition Window shows you a preview of the content of a method, and the code navigation buttons move you forward/backward through your navigation operations.  

  • Anonymous
    October 14, 2009
    I love Rockscroll and would welcome the thumbnail view. I work with an aging codebase flush with large files and several different code formatting strategies, regioning patterns, or lack thereof. Refactoring is a series of small changes that will take a few years to fully clean up the codebase. In the meanwhile, I'll be RockScrolling!