dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.05k stars 4.03k forks source link

Using the editor dropdown to navigate to Visual Basic event handler is painful #37854

Closed vsfeedback closed 4 days ago

vsfeedback commented 5 years ago

This issue has been moved from a ticket on Developer Community.


I have a VB.net project with windows forms.

If I am in code view for the form and try to navigate to a button's (say btnOK) Click handler using the text editor's dropdown lists, I have to:

  1. (Optional?) Using the left-most dropdown pick the module(?). In most of my situations, there is only a single item and I skip this step.
  2. Using the middle dropdown, I have to scroll to find the right button. Why is this list structured like this with classes, the class's events and then the class's members which support events?!?
  3. Then I have to go to the right-most dropdown and find the 'Click' event. Why does it show all of the possible events? Why if you accidentally click the wrong event would you want it to create the event handler method?

If I want to navigate back to a regular method on the form, I have to:

  1. Select the form from the middle drop down
  2. Select the method from the right-most dropdown. This is an extra unnecessary step if all of the class's methods were in the one list (the right-most).

I spend 99% of my time maintaining existing code and browsing rather than creating new code. The design of a C# project's dropdown organisation is vastly superior for this purpose:

  1. Select Namespace
  2. Select class
  3. Select method.

Is there an option to have C# style navigation instead of the VB.NET way? If not, please provide one it would be a very nice productivity improvement.

Thanks!


Original Comments

Jane Wu [MSFT] on 4/30/2019, 02:24 AM:

Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.

Cameron Miller on 5/2/2019, 10:13 PM:

Hi I also found that I can't navigate to directly to a control's declaration using the dropdown navigation (e.g. Friend WithEvents cmdEscape As ButtonRounded). This may be a bug?

sharwell commented 4 years ago

🔗 This issue is a subset of experience requested in #36812.

shemmy01 commented 3 years ago

I have a similiar problem. The middle dropdown is displaying all the controls of the form but will always select the events of the form and ignors any selection of another control. Selecting events for a contol can be done from the desingner panel thru properties.

sharwell commented 3 years ago

Hi @shemmy01,

That is a separate issue which we are tracking here: https://developercommunity.visualstudio.com/t/Version-16100-release-editor-problem/1432877

Thanks!

CyrusNajmabadi commented 4 days ago

Closing as this is not an area we are investing in.