Unbound type smart tag


One of the things we’re trying to do for Whidbey is a feature we call the “unbound type smart tag”.  You’d probably call it “automatic add ‘using’”, I guess.  It works like this:


You have a typename in your code, and you’ve referenced the correct assembly, but you don’t have a ‘using’ directive in the current file.  It doesn’t colorize as a type.  (We now colorize types specially).  A smart tag appears, offering to insert a ‘using’ directive or to fully qualify the name.


I had written a huge post about how we do type colorization, and all the design decisions we made, but then I lost it.  uggh.

Comments (6)

  1. Jan says:

    Oh no, Microsoft stole my idea! 🙂

    http://dotnet.leadit.be/typefinder/

    It’s great that this kind of functionality comes to VS.NET, thanks!

  2. Just out of curiosity: are those smart tags easily checkable through keyboard?

    I mean, something like "ALT+DOWN" to reveal it? I don’t know if it’s a Vi reminiscence, but I just hate to ‘leave the keyboard’ while writing code.

    That’s something I loved about Intellij’s Idea (for Java): you could use the whole IDE through keyboard shortcuts (and I might add that Visual Studio 2003 does a terrific job on that issue).

    TIA.

  3. jaybaz [MS] says:

    Leonardo: In Office you can use Ctrl-Alt-F10 (I think). It’s not very convenient, for sure.

    In the Whidbey C# profile, we are thinking we’ll map it the Activate Smart Tag command to Ctrl-DOT. You can always remap it yourself if you don’t like that keystroke. And with Profiles, you can save your settings forever.

    You can also activate most activities without smart tags – they’re on the menus already. Some people really dislike smart tags.

  4. Great, I look forward to using it! Just can’t live without those refactorings! 🙂

    I downloaded the latest whidbey from the msdn subscriptions site and couldn’t install it on 2 machines (winXP & win2k3). Same cause on both: error no MDAC 9 beta (or something).

    Keep up the awesome work! You guys rock…

  5. ReSharper (from JetBrains) already has this now, for those of us who can’t wait until next year…

    They’re up to build 79 of their Early Adopter’s Program: http://www.jetbrains.net/confluence/display/ReSharper/Changes

Skip to main content