Partager via


Sean really wants some feedback from you!

Sean is thinking about making some changes to the Code Definition View (CDV).  Specifically, instead of having it be a read only view of your code it would now be editable.  The CDV is one of my favorite features and I've talked about a lot before.  Go over to  https://blogs.msdn.com/vseditor/archive/2004/07/27/199169.aspx and let him know if you think it's a good idea or not.

Personally, while I think being editable would be nice, I would prefer this change instead:

Make navigation in the CDV act as a stack.  i.e. when you double click in the CDV make that the main view.  You can repeat that ad nauseum.  Then, when you're done, just click the back mouse button (or some other button/keystroke) and your navigation action pops off the stack and what you're looking at goes into the code def view and you're where you were before.

This helps when you're really trying to drill down into how code works.  You're invoking a method and you see it's implementation in the CDV.  However, that method calls out into another method and you really want to see how that works.  So you double click in the view so that the main editor is now showing the method implementation.  You click on the method called from there and repeat what you just did.  You do this as much as you want, pushing and popping navigation steps.  (In fact, having the little IE forward/backward buttons on the CDV might be incredibly useful for discovering and taking advantage of this functionality).  When you're done you now understand the system and you're back where you started, ready to code.

If you like this idea, let him know.

Heck, if you don't like this idea, then *definitely* let him know too. :-)

Edit: The code def window looks like the following:

use the source luke!

Imagine that in the top pane (the editor pane) you're using this variable “buffer”, but you've totally forgotten what it is.  The bottom pane shows you what you would have seen if you'd invoked “go to definition” on it.  This works for any identifier that your cursor might be on.  It also works on types loaded from metadata.  If you're on such a type (say System.Console), we'll read in the metadata, convert it into C# signatures and spit that out with the XML doc comments into the code definition page.  We're also invetigating a “cleaned up” version where we take the normal XML comments (which can be pretty unreadable) and we format them nicely for you.

Comments

  • Anonymous
    July 27, 2004
    I like. Might be a bit strange to get used to at first, but I like.
  • Anonymous
    July 27, 2004
    What is this thing? Screenshots?
  • Anonymous
    July 27, 2004
    Dr. Pizza: Updated. Let us know what you think.
  • Anonymous
    July 28, 2004
    Hm, interesting.

    I hafta say, one of the few things I love about Eclipse are its ctrl-click/ctrl-hover features. Ctrl-clicking an identifier takes you to its definition, and ctrl-hovering it shows you a fragment of code showing its definition.
  • Anonymous
    July 28, 2004
    Dr. Pizza: Would you like behavior where if you held down alt you'd get a hyperlink on the identifier under your mouse taht you could click on to "go to definition"?
  • Anonymous
    July 28, 2004
    Interesting idea. Reminds me of what you do when you're debugging a program. So you'd highlight a function, then you could "Step into" it and view the function. Then you could "Step Out" to return to where you were at.

    I think it would be really helpful when you're working with someone else's code and you're not quite familar with it.

    Ed
  • Anonymous
    July 28, 2004
    I thought the CDV was one of the best new features in VS 2005. However, your idea for the CDV makes it even better (almost to the point where now I'll be disappointed if it isn't implemented...).
    I don't think it should be editable. I think that would be too confusing... why not just have split windows at that point?
  • Anonymous
    July 28, 2004
    Josh: Thanks :-)

    I'll let Sean know.