Tuesday, December 21, 2010

Eclipse to Visual Studio 2010: What I'm Missing

I've recently been spending a lot of my time in Visual Studio 2010. Having been in Eclipse for many years, the transition has been somewhat painful. In no particular order, here are the features that I'm still trying to track down. VS experts, help me out!

  1. Quick Fix - Assign to local variable.  Write the RHS of an assignment statement, then Ctrl+1 to have the IDE suggest/insert a LHS.
  2. Curly brace auto-completion.  When I type the opening brace and hit enter, automatically indent one tab and add a close brace on the following line.
  3. Ctrl-Click for type definition hyperlinking.  Basically, a mouse gesture for Visual Studio's Go To Definition F12. I've been told there is an extension for this??
  4. Ctrl-Click for externalized strings (resources in .NET?).  In Eclipse, when I Ctrl-Click on an externalized message referenced as a static String, I can jump to the properties file directly.
  5. "Flexible" Go To Definition. In Eclipse, if I write some code that calls a method, and I don't have the particular overload parameters sequenced correctly, I can still (typically) jump to the definition of one of the overloads. Since they're typically clustered together in the target type, this is a poor man's way of getting around reading the Javadoc.
  6. (Speaking of Javadoc), Hover over a method to see its NDoc documentation. Reading the commented XML syntax on a method doesn't do it for me.
  7. Link With Editor / Show In.  When I'm jumping around using Go To Definition, I quickly lose track of where (in the resource tree) a particular class is.  In Eclipse, I can toggle and untoggle Link With Editor to highlight the resource in Package Explorer.  How do I select the current editor's file in Solution Explorer?
  8. Synchronize View. This one is a HUGE hole. How the hell do you .NET people sync your code in a sane way??
  9. Multi-Page Editors. I'll qualify this one a bit by saying that I've seen the implementation details of multi-page editors in Eclipse, and there are some definite issues. But the functionality is critical when you have an XML document which also has a graphical editor. (Entity Framework conceptual models, I'm lookin' at you.) Gimme a synchronized two-tab editor so I don't have to keep doing Open With, closing the other editor (can't have both open at the same time, another FAIL), etc.
  10. Outline View in the XML editor.  'Nuff said.
  11. Collapse All / Expand All.  Solution Explorer needs these badly.
  12. File -> Restart. After I install a Visual Studio Extension, I need to restart. Please make this one click, thanks. 
  13. Workspaces.  I really don't know how to explain this one. You can see one of my complaints (relating to Team Explorer) in this post. Another example is that of "recent solutions". Please just keep my last solution open?  What am I missing here?  I need to have separate "threads" of work that are preserved somehow, so I can easily switch between conceptual projects in my daily work.

Please post back in the comments with answers to all of these so that I don't resort to editing C# code in Eclipse. Thanks.

12 comments:

  1. Open Resource and Open Type - In C++ you are not always sure where the file is, but you might know its name. Navigating to it is a pain.

    Incremental compilation - hitting the Build button is just so 1990'ies.

    ReplyDelete
  2. You're not alone: http://torkildr.blogspot.com/2009/05/ive-been-fighting-uphill-battle-against.html — I think you will find that ReSharper makes it better.

    ReplyDelete
  3. Hello!

    1-4, 6 and 7 you get with ReSharper. Don't think, just buy it! I can't use VS without R# anymore. It is from jetbrains and makes VS an IntelliJ IDEA.
    http://www.jetbrains.com/resharper/

    11 is available as Macros, or in the better "Solution Navigator" in the Visual Studio Power Packs:
    http://visualstudiogallery.msdn.microsoft.com/en-us/d0d33361-18e2-46c0-8ff2-4adea1e34fef

    ReplyDelete
  4. @Jesper, for those I think you can use File -> Navigate To.. (Ctrl+,).

    @Torkild, thanks for the info. If only ReSharper were free for commercial use..

    ReplyDelete
  5. @lcorneliussen Thanks! The Power Pack has quite a bit.

    I'll try to update the blog post later to incorporate these suggestions.

    ReplyDelete
  6. there is also a "free" plugin like Resharper. It really helps. http://msdn.microsoft.com/en-us/vcsharp/ee663901.aspx

    Here are the things that kill me in VS. Cant double click a tab to maximize or back to original size. Can't view class hierarchy. VS 2010 has made great strides, but in my book, it still is not close to Eclipse. I have not used IntelliJ so can only guess how far off VS is from that.

    Honestly, when ever i have a choice, I just do Java. I have converted projects that started as .NET projects just to gain the tools and productivity available in Java. The only thing i might miss would be LINQ (not that big of deal) and delegates.

    ReplyDelete
  7. Never mind plugins being free, what about using them with a free IDE? I do my C# development as a hobby, but use Eclipse all day, so for any Windows-centric bits (i.e. WinForms) then I'm stuck with VS.Net Express and no extensions. Luckily, I mainly work in Linux and so I've got MonoDevelop - the guys are great, and I've contributed back a couple of times and wish I could do more.

    With #13, isn't there an "auto-open last solution" option, or has it been dropped by 2010? I thought I'd considered using it because I almost exclusively use one project under Windows, but didn't because of the odd occasions I use another project.

    As for the rest of them, I'll see about suggesting them to the MonoDevelop team and seeing what they like. I knew there were things I felt were missing from VS.Net/MonoDevelop compared to my day job with Eclipse, but it is good to have a list from someone else's PoV.

    ReplyDelete
  8. I think I found the answer to #7. Go to Tools->Options->Projects and Solutions->General and then check the "Track Active Item In Solution Explorer" checkbox.

    ReplyDelete
  9. This article is interesting and useful. Thank you for sharing. And let me share an article about health that God willing will be very useful. Thank you :)

    Khasiat Daun Sirsak untuk Benjolan
    Obat Telinga Bernanah paling Ampuh
    Cara Menghilangkan Benjolan di Miss V

    ReplyDelete