dotnet / project-system

The .NET Project System for Visual Studio
MIT License
968 stars 387 forks source link

"View code" / "View designer" workflow for project files #4233

Open vegardlarsen opened 6 years ago

vegardlarsen commented 6 years ago

As David Wengier announced on Twitter, VS 2019 preview 2 supports previewing project files when selecting them in Solution Explorer. A natural extension of this would be to support navigation from the code to the Properties view and back, akin to the traditional CodeBehind navigation from code to designer and back; where you can right-click and "View code" in the designer and "View designer" from the code.

It would be extra helpful if the keyboard shortcuts F7 and Shift+F7 worked here as well.

@davidwengier @davkean

Pilchie commented 6 years ago

I know @davidwengier took a look at this already, but I can't remember what the outcome of it was.

davidwengier commented 6 years ago

I looked into making the official "View Code" and "View Designer" menu items work for project files to enable the keyboard shortcuts in #3968 but is far from simple. A right-click menu option might be more possible, but there might be some issues with that too. For example if I'm on the Debug tab of the app designer then View Code should logically open launchSettings.json and not the project file.

Pilchie commented 6 years ago

Let's leave this, and we'll reconsider once people have had a chance to play with the double click behavior for a while.

davkean commented 6 years ago

Note, this is different from the View Code/View Designer menu items on the context menu in Solution Explorer which is what we looked at. That was much more challenging than this.

davidwengier commented 5 years ago

Note to self: Look at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Commands.DefaultStandardCommandSet97Handler, which currently uses the File scoped DocumentManager, but maybe can use the ProjectFile scoped one too?