Roslyn: Support Code Definition Window

Created on 30 Jul 2015  Â·  50Comments  Â·  Source: dotnet/roslyn

Based on telemetry numbers showing extremely low usage and the introduction of Peek Definition in VS2013, we never implemented support for the Code Definition Window as part of Roslyn.

We should consider re-adding support to update the window.

Area-IDE Developer Community Feature Request help wanted

Most helpful comment

Are you working on this? I loved the Code Definition Window feature and use it all the time. Can't believe they dropped it. I am a newbie here. How does this work in terms of getting something done either by MS or outside developers with an interest in fixing it?

All 50 comments

Are you working on this? I loved the Code Definition Window feature and use it all the time. Can't believe they dropped it. I am a newbie here. How does this work in terms of getting something done either by MS or outside developers with an interest in fixing it?

This isn't something that we (MS) are actively working on until we hear more about people wanting it back.

As far as someone else implementing it, the process isn't very hard. You need to have some component that watches the caret moving and then calls IVsCodeDefView.SetContext(). (Keeping in mind that this should happen after some delay so that it doesn't cause responsiveness issues as people navigate quickly through their code, etc).

The unfortunate part is that we don't yet have a good way for someone outside of Microsoft to deploy and test their changes in Visual Studio, though we are working to address this in a VS 2015 Update.

I ran across references to the IVsCodeDefView class and related API’s when I was poking around trying to figure out what has happening with the CDW in my first installs of VS2015. When it continued not to work in a clean install on a new Windows 10 machine I knew it wasn’t just something weird about my installations.

There does appear to be online doc for at least some of these classes (I think it is in amongst the interop stuff?). I will poke at it some more in my free time. If I have a question now and then can I direct these to you or is there a better venue through GitHub or Connect that would maybe bring more interested parties into it?

I really think the CDW is a good feature but maybe one that not enough people were aware of (or maybe it is just my coding style that it particularly suits). But, for example, there is that Alt-select keyboard feature that lets you work on columns of text that I never would have known existed if I hadn’t stumbled on a You-Tube video by one of your VS developers that cooked it up. There are probably lots of other little gems in there not enough users know about.

Anyway, thanks for getting back to me.

Regards,

Curtis Marx

From: Kevin Pilch-Bisson [mailto:[email protected]]
Sent: Friday, August 14, 2015 11:19 AM
To: dotnet/roslyn [email protected]
Cc: nobledog [email protected]
Subject: Re: [roslyn] Support Code Definition Window (#4224)

This isn't something that we (MS) are actively working on until we hear more about people wanting it back.

As far as someone else implementing it, the process isn't very hard. You need to have some component that watches the caret moving and then calls IVsCodeDefView.SetContext(). (Keeping in mind that this should happen after some delay so that it doesn't cause responsiveness issues as people navigate quickly through their code, etc).

The unfortunate part is that we don't yet have a good way for someone outside of Microsoft to deploy and test their changes in Visual Studio, though we are working to address this in a VS 2015 Update.

—
Reply to this email directly or view it on GitHubhttps://github.com/dotnet/roslyn/issues/4224#issuecomment-131144979.

Got low telemetry numbers, let's get rid of it. That's the way to handle it. How about looking at yourselves and admitting that you did not promote or educate the developer community well enough on this CDW feature. Now as people evangelize about CDW used in VS 2013, they find it gone in VS 2015. Yeah, good move Microsoft!

Hear, hear. And now a rather long commentary. I would cut MS some slack on this if two conditions are true:

1) Low telemetry really means something akin to "not statistically significant". We don't necessarily have to go 5 sigmas here - we are not looking for the Higgs Boson - but is there an actual cutoff guideline or is it really at the whim of the product manager. I don't know what the actual number was. Perhaps someone at MS would care to share it. I don't see this information being of deep proprietary value and it would be pleasantly transparent of them to let us know.

2) The re-implementation under Roslyn is actually incredibly difficult. This seems very unlikely to me based strictly on some back of the envelope reasoning. The VS2013 class database machinery already supported features like Peek, Find All References, Go To Definition, poor defunct CDW, and clearly much deeper modeling of the all the code entities and their relationships than these functions by themselves require.

Further VS2015 adds the reference tracking feature on all first order C# entities like classes, methods, properties, enums, etc. This is kind of an inverse to the CDW since it allows you to look at where an entity is used, jump to those locations if you want, and can also show a few lines of code in the environs of the entity wherever it is referenced.

This saves having to do a Find All References followed by stepping through the results in the Find Symbols Results window. There is nominally some context in the Find Symbols Results window, too, but it only extends to the single line containing the entity. The reference count pop up window with nearby code lines is an improvement both in terms of the quality of information returned and the reduction in UI step cost to obtain that information.

Interestingly, the whole truth about reference counting feature is something I had to discover by poking at it. I think I have reasonably good UI intuitions about MS products by this point after 30 years of using them (not all of them pleasant, hmm, need I say Vista?) and in spite of my familiarity the full functionality of the reference counting feature did not jump out at me in one fell swoop. I, of course, appreciated the value of having a reference count immediately and thought that was a great addition but it took me a few weeks more to notice it was not just a count but a link to some considerably more extensive and useful data elaborating on the count alone.

So ironically, it seems to me the references counting enhancement may be just as much at risk of under-recognition, under-utilization, and consequent "poor telemetry" as CDW if others users are as slower or slower on the uptake here than me.

Neither Peek Definition nor the references counting feature provide equivalent functionality to the CDW; the former because it focuses on easing access to the where top level entities are used while CDW provided a cheap UI step cost method to get to the definition of items used within reference counted entities. In effect, the CDW efficiently supported the other linkage direction from the new reference count feature.

Peek does give you this definition access but at the expense of in-lining (in the code Window, anyway) the definition code of interest. When this Peek block appears in a longer and more complex function (and thus scrolls relevant code off the bottom of the window's viewport) my brain has too take on the "clerical" cognitive/mnemonic load of remembering what I can no longer see and how it relates to what I still can (and I hate taking on cognitive/mnemonic load if the computer can do it instead).

Granted I can promote the Peek to its own document and/or resize it but those are UI actions forced on me by the Peek. With CDW there are no additional actions required other than whatever visual cortex directed eye movement is needed to get your peepers onto the CDW pane. Further, the pane's data is ephemeral and so requires no close or cancel action like a Peek section. CDW was a great idea and a substantial time-saver when you just wanted a quick check on the definition of an entity used inside another (now reference counted) top level entity.

To be fair to Peek, if I am reasonably sure I am going to have to edit code in the Peek segment then Peek is simply great - this is where it clearly improves on a serious limitation in the CDW (which, remember, was read only). There was some forum chatter about trying to make CDW writeable. I suspect that this would be doable but nontrivial from an engineering perspective but worse it would be considerably less perspicuous UI design. The Peek approach is a far better UI metaphor and I suspect is more reliably engineered than any editable CDW could have been. I give MS only kudos for adding Peek (and, also, the reference counting facility and the related Author and change information, which I have ignored here because they don't bear directly on the issue at hand, but which are are, I believe, also very useful and well considered adds).

In conclusion to this rather long piece (but I felt some flaming was called for here) "low telemetry" is certainly a valid factor in evaluating the fate of a feature but a strategy that just looks at this number is too simplistic. CDW telemetry may have been low due to poor documentation, marketing, and/or user education efforts. I should mention that in my personal experience I have pointed CDW out to severale other developers I worked with and they adopted it wholeheartedly and are are just as unhappy with its removal from 2015.

The only substitute for the CDW which remains is Go To Definition which may not only pop you out of the window you are working in but may even end up putting you on a new Window Tab that forces your initial window off the visible tab list if there are too many doc Windows open. This can make "popping" back to your previous mental working set context much more challenging than just glancing momentarily at another window on the screen,

So much of the VS UI design philosophy seems to have been focused for many years on finding ways for the IDE to support the user's mental working set and protect it from distractions. Intellisense and related typing completion, F1 doc, maintaining window layouts, formatting and syntax coloring, live syntax processing, and facilitating navigation are a few examples of such features we now more or less take for granted but definitely were not in V1.0. Writing good code is hard and we poor humans need all the help we can get. Killing CDW is a step backwards and should be taken advisedly, if at all.

As noted above, given all the infrastructure that supports Peek, Find All Reference, Go To Definition, and the like I find it impossible to believe reimplementing CDW is any kind of substantial engineering challenge whose expense makes updating it for VS2015 prohibitive.

A much better strategy would be to fix it and then make an effort to get the word out about it (not to us converts - we will be dancing with joy) but to the rest of your users. At the same time you could highlight the extended capabilities of the reference counting feature and maybe call attention to when Peek is more useful than CDW (i.e., when editing may be on the table). Now I am using Peek in many context where I just want to see a definition with no likelihood of editing it. It works but is far more cumbersome.

I do not think this decision was thought through well enough prior to release. I know you have lots on your plate when you are putting together a new release. That a few things might fall through the cracks or be only partially reasoned out is perfectly understandable. But you also release Service Packs (and I guess this may be increasing in frequency). I think the arguments I have made above have some merit and traction regardless of the telemetry numbers (which I know were not 0 - I use the damn thing). I sincerely prevail upon you to reconsider and perhaps target restoring CDW in VS2015 SP1?

Regards,

Curtis Marx

Didn’t see this comment on GitHub itself. Do you work for MS? I wish I did understand the trade-offs since it seems like it would be so easy to revive the feature but maybe it would be harder than it looks.

What do you do in VS2015 when you are looking at some method name inside a function and want to be reminded of how it is implemented. Just rely on Peek or Go To? Don’t you find that kind of breaks your flow?

Convince me that this would really have been hard to do, taken a person-week of work, say, and I’ll shut up about it particularly if the telemetry was really that low (and how low was that, anyway).

Just hate to see a generally excellent upgrade marred by a seemingly gratuitous feature cut.

Regards,

Curtis Marx

From: Nate Lowry [mailto:[email protected]]
Sent: Wednesday, September 30, 2015 4:38 PM
To: dotnet/roslyn [email protected]
Cc: nobledog [email protected]
Subject: Re: [roslyn] Support Code Definition Window (#4224)

[:+1:]Miss this feature, but understand tradeoffs.

—
Reply to this email directly or view it on GitHubhttps://github.com/dotnet/roslyn/issues/4224#issuecomment-144536002.

I´ve been working in VS2015 for a few months now and still miss this feature. I agree with @nobledog that Peek definition breaks the flow a bit. I used to have Code Definition window up on one of my monitors when working with old projects that others wrote. I think it is especially useful when working with old and/or unfamiliar code. Peek definition works, but it takes up space and adds a bit of confusion to the view (having code inserted in the middle of code like that). Maybe it`s just me, but I find it a bit messy. On the bright side, you can actually type and change the code in Peek definition though. I guess they both have their pros and cons, and I hope that with time, I´ll feel as comfortable with Peek Definition as with CDW.

On the side note, when I asked my colleagues if CDW was working for them, they did not know what it was, so they`re probably all among those who never even opened it (nor saw the need for it).

I always thought it was just broken in VS2015... It clearly isn't _removed_, because I have it sitting right here, empty, and it's still on my View menu. Peek isn't anywhere near a viable replacement for CDW. CDW is non-intrusive. With CDW I click and the docs are there almost instantly. With Peek I right-click (or type Alt+F12, which isn't as easy IMHO), find Peek, click, then have this annoying window that doesn't go away unless I hit Escape or X, yet it intercepts mouse scrolling and breaks the code flow in whatever file I'm working on. That's like at least four orders of magnitude less convenient.

I find it hard to believe that it would be so incredibly hard to implement. You obviously already do this with Peek, just put that crap into the CDW. You yourself (MS) said it isn't hard to do, and as you also pointed out, you're in the best position to do it, so why not just do it? Was it really so hard to maintain that you felt the need to remove it and replace it with something that does the same thing but in a crappy way?

I wonder about what feature I use will disappear next because it doesn't win a popularity contest.

Just joining the plea for getting the CDW back in VS2015.

Like the other posters on this issue, I've found that the CDW is a productivity enhancer, the alternatives are a reduction in productivity. I'm not sure whether your telemetry reports open events, or whether you know when the CDW is pinned or not, or what. I'm speculating that the telemetry reports events, so a pinned CDW looks far less used than it is.
There is a Connect issue here:
https://connect.microsoft.com/VisualStudio/feedback/details/1607919/code-definition-window
Upvote it!

Good point. I bet they only think they know how much use this feature was getting in prior releases. In any case, it continues to be something I find to significantly reduce productivity for me in VS2015. Peek is no substitute.

Thanks for the additional vote in favor of restoring this.

Curtis Marx
Nobledog

From: PhilBarila [mailto:[email protected]]
Sent: Thursday, December 3, 2015 11:09 AM
To: dotnet/roslyn [email protected]
Cc: nobledog [email protected]
Subject: Re: [roslyn] Support Code Definition Window (#4224)

Like the other posters on this issue, I've found that the CDW is a productivity enhancer, the alternatives are a reduction in productivity. I'm not sure whether your telemetry reports open events, or whether you know when the CDW is pinned or not, or what. I'm speculating that the telemetry reports events, so a pinned CDW looks far less used than it is.

—
Reply to this email directly or view it on GitHubhttps://github.com/dotnet/roslyn/issues/4224#issuecomment-161692260.

I've been playing with this a bit in my spare time, and I've made some progress. It currently only updates on caret changes in source documents (not from object browser/class view/call hierarchy/etc, and needs some tests and thorough review, but it's a start.

You can see it at #7487

Cool! Kudos for this Pilchie

This is great news, thank you!

That’s cool! Thanks for the effort!

Please bring CDW back. Peek function is not quite the same as CDW and the use case is different. I've been using CDW for awhile and feel like my right arm was just cut off.

Moves like these are exactly why (well, one of the reasons) I turn off telemetry reporting - what I find convenient to use for my coding style or approach is not necessarily right one for others and vice versa. Loosing features that you get used to forces you to run with the herd, and instead of exploring new ways of doing things, forcing self to do like others b/c otherwise you'll keep loosing what you like. Telemetry may be ok for insight (connecting the dots) for optimization, but not for do-or-die decisions (i.e. telemetry may be good to see that people look up in CDW and then go edit the definition they looked up, and thus optimization may be to make CDW window editable; or seeing that people click on variable and see type definition on it and in most cases immediately hover over to type to see type def, and thus extending CDW to always show type def when in context of variable to optimize). B/c killing a feature that a herd isn't using simply causes to not look for new features in the future in case herd doesn't go there as well - spiral of death.

I haven't been doing as much coding lately but I have been following this thread. I should mention that MS closed the Connect issue I had initially raised this in. The link is below:

https://connect.microsoft.com/VisualStudio/feedback/details/1624176/code-definition-window-not-working-in-vs2015-release-version-was-fine-in-rc

It says the Connect entry is was "Closed as Duplicate" and references back to here. I suppose that is reasonable. I hope that is all there is to it and not that it has been shelved as a non-problem by the Dev Studio team.

I have not had a chance to play with Pilchie's code as yet. It may be usable enough for me and I will try it when I have little more time. I do hope that there is some movement to bring CDW back in the next release. It clearly is not hard and some of us really miss it. One is almost tempted to believe that whoever made the decision does not really use the product much.

Along that line, I had not thought of the issues with telemetry raised by Philbarila and LBensman above. I wonder how many other product decisions MS is getting wrong by over-reliance on this technology and a lack of actual use testing by management.

Cheers,

CM

An update for everyone. I am the manager of the team responsible for the C# and VB language services. As such, I was the one who made the decision to cut the Code Definition Window in VS2015. I was also one of the people responsible for implementing it back in VS2005, and it's something near and dear to my heart.

Replacing the old compilers and language services with Roslyn was a huge task, and we needed to look for ways to reduce scope as much as we could in order to get it out the door. We used the best information we had to make those decisions, knowing full well that some of them would be painful. Through the project several other things have been cut (that people haven't even noticed, and know I won't tell you what they are :wink:). Other things were initially on the cut list, but were added back after we shipped public CTPs based on feedback we got from early adopters. Still other things have been added back since we shipped VS2015 in Update 1.

We're constantly watching feedback and trying to make the best product we can. That is a balance between:

  1. Enabling new scenarios.
  2. Shipping new features that we expect will be widely used and help make millions of developers more productive.
  3. Fixing bugs and improving features that have already shipping and are affecting people every day.
  4. Bringing back features that were cut that were loved by some set of people, but didn't see the adoption of some of the more "in your face" features.

Right now my team is mostly split between 1 (enabling .NET Core and ASP.NET Core), and 3, responding to issues filed here, through connect, crashes reported by windows error reporting, and things reported through the Report Feedback. BTW, I'm _also_ the one that resolved the connect issue with the pointer to here - it's not that we're trying to cover anything up, it's just that we use both places to track potential work, and don't like double counting things. I'm still subscribed to get an email every time someone comments on the connect bug, just as I am here on this issue.

Still, I know that it's painful, and I'm working as I have time to try to bring this back. Currently it's waiting for me to have a chance to respond to the excellent code review feedback my team gave me. I'll be spending several hours on Monday on an airplane - hopefully I'll have some time to look at this more then.

As for ship vehicle - I'm not sure what it will be. Depending on when I finish it, it might be able to fit into VS 2015 Update 2, however, the divisional focus there is mostly around increasing quality of existing features rather than adding new (but old) ones, so we'll see. If not Update 2, then I definitely expect it to be in the next major version of Visual Studio.

Thanks for your passion everyone!

Hi Kevin,

Thank you for the detailed response. You clearly use the product. I stand corrected. I am also satisfied that the closure of my Connect thread is not emblematic of a dark conspiracy at Microsoft. (We will leave the alien artifacts hidden in the Redmond HQ basement out of this discussion).

I realize that you have a lot on your plate and I have never suspected CDW would or should be a top priority for your group. I also understand that there is a huge difference in man-hour commitment between implementing some private workaround and producing commercial quality production code. That said it does seem clear that CDW is more of a resuscitation problem – not substantially new work – so I hope the coding time investment will be mostly in regression testing and not breaking new ground.

I am wondering, given that you had a direct hand in implementing CDW originally and presumably must have been a user early on, whether you continued to use it until the release of VS 2015. Perhaps you had evolved away from employing it in your own coding work and I am actually a bit curious how your workstyle changed so that this was not a painful process.

Maybe while you are sitting on that airplane you could spend a few minutes imagining that you are still like one of us (CDW dependent types) and consider how the flow of your work would be interrupted by its sudden disappearance. It is more jarring than even I expected as I have force myself to use VS 2015 fulltime. There is so much else to recommend the product that I didn’t see sticking on VS 2013 as a real option; certainly not in the long run.

One of the posters on this thread (I am sorry I forget their handle at the moment) suggested maybe improving CDW if and when it is brought back and had a couple interesting ideas. Maybe that would make reviving it a more attractive proposal and I would be interested if other poster have ideas along these lines (i.e., small and presumably easy to implement tweaks that would refresh the feature and make it worth promoting a bit in the next release). Editing in the CDW window would be quite nice but I can see where this might be a little more challenging technically than it sounds.

In any case, I do appreciate that someone at MS actually listens.

Regards,

Curtis Marx
Nobledog

P.S. You do realize that bit about alien artifacts was a joke. Or was it…

P.P.S. Too much X-Files.

From: Kevin Pilch-Bisson [mailto:[email protected]]
Sent: Friday, January 29, 2016 11:04 PM
To: dotnet/roslyn [email protected]
Cc: nobledog [email protected]
Subject: Re: [roslyn] Support Code Definition Window (#4224)

An update for everyone. I am the manager of the team responsible for the C# and VB language services. As such, I was the one who made the decision to cut the Code Definition Window in VS2015. I was also one of the people responsible for implementing it back in VS2005, and it's something near and dear to my heart.

Replacing the old compilers and language services with Roslyn was a huge task, and we needed to look for ways to reduce scope as much as we could in order to get it out the door. We used the best information we had to make those decisions, knowing full well that some of them would be painful. Through the project several other things have been cut (that people haven't even noticed, and know I won't tell you what they are [:wink:] ). Other things were initially on the cut list, but were added back after we shipped public CTPs based on feedback we got from early adopters. Still other things have been added back since we shipped VS2015 in Update 1.

We're constantly watching feedback and trying to make the best product we can. That is a balance between:

  1. Enabling new scenarios.
  2. Shipping new features that we expect will be widely used and help make millions of developers more productive.
  3. Fixing bugs and improving features that have already shipping and are affecting people every day.
  4. Bringing back features that were cut that were loved by some set of people, but didn't see the adoption of some of the more "in your face" features.

Right now my team is mostly split between 1 (enabling .NET Core and ASP.NET Core), and 3, responding to issues filed here, through connect, crashes reported by windows error reporting, and things reported through the Report Feedback. BTW, I'm also the one that resolved the connect issue with the pointer to here - it's not that we're trying to cover anything up, it's just that we use both places to track potential work, and don't like double counting things. I'm still subscribed to get an email every time someone comments on the connect bug, just as I am here on this issue.

Still, I know that it's painful, and I'm working as I have time to try to bring this back. Currently it's waiting for me to have a chance to respond to the excellent code review feedback my team gave me. I'll be spending several hours on Monday on an airplane - hopefully I'll have some time to look at this more then.

As for ship vehicle - I'm not sure what it will be. Depending on when I finish it, it might be able to fit into VS 2015 Update 2, however, the divisional focus there is mostly around increasing quality of existing features rather than adding new (but old) ones, so we'll see. If not Update 2, then I definitely expect it to be in the next major version of Visual Studio.

Thanks for your passion everyone!

—
Reply to this email directly or view it on GitHubhttps://github.com/dotnet/roslyn/issues/4224#issuecomment-177061644.

I just discovered that the CDW does work in C/C++. Is that because the C++ compiler isn't Roslyn, so it's using the old-school parser in the IDE that's independent of the parser in the compiler?

I really appreciate that you are looking into bringing it back! I hope you can get it sooner than later, I still find myself looking at that empty CDW to see the definition of the symbol under the cursor. With the C++ project I'm working on, it does!

Another vote to have this back please - thanks for giving this some priority Kevin, it's a very useful feature especially in debugging scenarios when you don't get as much identifier info during mouse hover

Just want to +1 this issue. I jump back and forth between C++ and C# all day long. I get tons of productivity enhancement out of the CDW when in C++, and it's jarring when switching over to a C# file and all of a sudden the CDW stops updating. :(

Unfortunately, it's still not back in Update 2

Joining the chorus. CDW is indispensable when trying to come up to speed on a legacy codebase. Shame it's been dispensed with. Guess I'll leave my telemetry enabled from now on.

Bring this back! I used it all the time in VS2013 and miss it a lot in 2015.

But ... why is the window present at all in VS2015 if it doesn't work? Why wasn't the window removed? With the window present but not working most users are just going to close it but are not going to bother coming here to voice an opinion.

I guess it’s not removed because the functionality is still working in C/C++?

It's nice that it works in C++, even if it doesn't work in other languages that it used to work in.
But.... it gives no indication to the user that it doesn't work in the other languages.
How hard would it be to have the window only available in languages it works in, or give users a common-sense message when they try to use it in a non-supported language?
The way it is now it gives users the impression there is something wrong with the install.
I don't doubt some users have reinstalled Visual Studio trying to fix this (i.e. wasted a LOT of time in a futile effort to fix something that is intentionally broken).

Nah, don't spend time figuring out friendly messages for it not working - rather just bring it back and make it work ;)

If Pilchie has had time to keep following this thread I was wondering if he could comment on its current status with the Dev Studio team. Whatever the telemetry may suggest, I think it is clear that this is a feature with some die-hard fans.

In fact, I would be quite curious as to whether there are many such "orphan" features that have fallen out of the product but retain strong (if perhaps small) followings who persist in lobbying passionately for them. I continue to find the absence of CDW to be a significant loss in functionality. Peek is not even close to a substitute (although it is an excellent feature in other work contexts).

In any case, are we CDW junkies just one of a large collection of diverse, small feature advocacy groups or are there only a few discarded features that have strong followings like this?

Googled why CDW wasn't working anymore in VS2015...ended up here..
I join the ranks, please bring it back !

I'm still working on bringing it back, though at this point it will likely be as part of the next version of VS.

If you are able to deliver it in the next version of VS, I’ll take it!

Many thanks for the efforts!

Hi Kevin,

I can wait. Its return will be greatly appreciated. Thanks for your efforts and for listening to our whining.

Best regards,

Curtis Marx

From: PhilBarila [mailto:[email protected]]
Sent: Friday, May 27, 2016 7:48 PM
To: dotnet/roslyn [email protected]
Cc: nobledog [email protected]; Mention [email protected]
Subject: Re: [dotnet/roslyn] Support Code Definition Window (#4224)

If you are able to deliver it in the next version of VS, I’ll take it!

From: Kevin Pilch-Bisson [mailto:[email protected]]
Sent: Friday, May 27, 2016 2:59 PM
To: dotnet/roslyn <[email protected]roslyn@noreply.github.com>
Cc: PhilBarila <[email protected]Phil@Barila.Org>; Comment <[email protected]comment@noreply.github.com>
Subject: Re: [dotnet/roslyn] Support Code Definition Window (#4224)

I'm still working on bringing it back, though at this point it will likely be as part of the next version of VS.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/dotnet/roslyn/issues/4224#issuecomment-222251744 , or mute the thread https://github.com/notifications/unsubscribe/APBS-cozntJd2-izjB3LXROEtx85mNKZks5qF1sngaJpZM4Fi06c . https://github.com/notifications/beacon/APBS-QKKaCUgbcnBJ4QOGWgjskaRQFCIks5qF1sngaJpZM4Fi06c.gif

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/dotnet/roslyn/issues/4224#issuecomment-222275981, or mute the threadhttps://github.com/notifications/unsubscribe/ANJyML6SM93RDN-Qo6rbOB7d6r2TFi_Gks5qF4KzgaJpZM4Fi06c.

I'm glad to hear it is coming back, even if not until the next version of VS.

Out of curiosity -- are there other tool windows in VS that only work in some languages, but give no indication of not working in other languages and leave the user thinking something is wrong with their install? Most users aren't going to find threads like this one when trying to figure out why a toolwindow isn't working.

@Pilchie, Not seeing it VS2017 RC. Is there a hope of it going in by RTM, or does "next version of VS" mean whatever follows 2017?

@Pilchie, is there anything you can share with us about the state of the CDW? Am I seeing a bug when I'm not seeing it working in 2017 RC2, or have you been unable to get your changes in yet?

I have not 😿

It is unfortunate that this feature is no longer supported. It is unacceptable that this feature is no longer supported and doesn't say it's unsupported both in the Code Definition Window itself and the documentation on MSDN. Don't waste our time!

I must admit the missing CDW is really bugging me now. I think I'm going back to 2012. The feature is passive but is very practical in a multi-monitor environment (no need to do Alt-F12) just to really peek whithout modification.

With the release version of VC2017 and no revival of the CDW for C# I am getting the feeling that this has become a total write off. There is no question that the addition of Peek and the ability to follow reference links at the start of every method block are very useful enhancements but as has been discussed above they do not qutie provide equivalent function.

I mean, I can Peek at a definition, then promote the peek section into its own document with two clicks. That new document is kind of like the old CDW except that it ends up on a par (from a UI perspective) with the set of active open documents which are presumably where primary work effort is being focused. This is more than I want from a "CDW" reference which is typically just to review some aspect of the definition under consideration.

How hard would it be to modify the drop down that contains the Peek Definition entry to include another called say "View Definition" that would locate the usual peek block but instead of displaying it inline, it would behind the scenes immediately click a special version of the "Promote to Document" command that puts the Peek contents in the CDW window replacing anything currently there.

How hard could that be? Especially if we keep the CDW read-only. I am perfectly happy with that. If I decide I need to do some editing CDW used to offer the usual Go To Definition and Find Reference facilities to get me to document level instance of the code in question.

Nine time of out ten CDW references don't lead to any need to edit the referred to code so having to perform an extra step to make the window contents editable is not a burden.

I do plan to poke at this problem a bit after I have had a change to look at some of the extensibility features in VS2017. Maybe I can implement a version for my own use. But if anyone out there who is already proficient in development work on the IDE wants to have a crack a this please do. You will get it done a lot faster and probably more reliably than I.

I note the old CDW is still present in VS2017 since I gather it works with C++ or VB or something. So all the pieces seem to be available.

Comments or suggestions appreciated as always.

Best regards,

Nobledog

@Pilchie, what would you need to make it worth finishing the work you started in putting this back up with the Roslyn compilers? I've been working with C++ for a few days, and it's a giant reminder of how useful this actually is, at least the way I use it.

Alternatively, is there a cookbook whereby someone who is completely ignorant of extension development could get started with this to try to complete what you started?

I would find the CDW very useful. I was disappointed to find it not working in VS 2015 and assumed it would be fixed in VS 2017. Please bring it back asap.
Thanks.

Guess I can't complain that the "Code Definition Window" is gone, since today is the first time--after heavy use of Visual Studio and its ancestors since 1997--that I even bothered to notice that whatever-it-was isn't there.

Reported at DC : link
More details at link

Ya, this tool window is something I only recently "discovered" as well. It's awesome for getting to know a new codebase. But not awesome when it isn't implemented.

Design review outcome: we would accept a pull request to implement support for this feature, but don't currently have plans to implement it ourselves.

Design review outcome: we would accept a pull request to implement support for this feature, but don't currently have plans to implement it ourselves.

@sharwell, it's appreciated that you'd accept a PR. Can you please provide guidance as to what kind of changes are needed? Is this a VS extension, or an addition to the roslyn API surface, or ....? Is there documentation that describes what VS needs that Roslyn isn't providing?
Thanks

Design review outcome: we would accept a pull request to implement support for this feature, but don't currently have plans to implement it ourselves.

@sharwell, it's appreciated that you'd accept a PR. Can you please provide guidance as to what kind of changes are needed? Is this a VS extension, or an addition to the roslyn API surface, or ....? Is there documentation that describes what VS needs that Roslyn isn't providing?
Thanks

@sharwell @Pilchie ? I'm game to at least look at the amount of effort involved, but I don't know where to start with it, and I don't have unlimited free time to grovel around looking for something without a bit of architectural guidance.

@PhilBarila I would start with attempting to port @Pilchie's original PR (https://github.com/dotnet/roslyn/pull/7487) to the current master branch in dotnet/roslyn. feel free to ask questions on https://gitter.im/dotnet/roslyn

Closing a duplicate developer feedback item.

Was this page helpful?
0 / 5 - 0 ratings