Visual Studio - Automatically refresh class view when changing class

后端 未结 13 2223
再見小時候
再見小時候 2020-12-23 17:18

I come from a Java background and have spent many years using Eclipse. One feature that I miss when using Visual Studio (2008) is that the class view does not automatically

相关标签:
13条回答
  • 2020-12-23 17:59

    The problem with View.SynchronizeClassView is that is doesn't work when a class is being viewed from a virtual folder.

    0 讨论(0)
  • 2020-12-23 18:05

    I can't help you with the class view, but maybe you want to give the solution explorer a try? You can synchronize this one via:

    tools -> options -> projects and solutions -> general
    enable "track active item in solution explorer"
    
    0 讨论(0)
  • 2020-12-23 18:10

    based on kingmaxxx's response I found that you can add a button to your toolbar to do the same:

    Tools|Customize -> Commands[tab] -> View[Categories]

    Grab the Synchronize Class View button and drag it to one of your toolbars.

    0 讨论(0)
  • 2020-12-23 18:12

    The best way is to create a context menu when you right-click on a type in code editor. Tools->Customize Click on 'Commands' tab. Select Context Menu radio button, and select "Editor Context Menus | Code Window". Then "Add Command" and select View->Synchronize Class View.

    Now whenever you right-click on a type, you can select "Synchronize Class View". It's the very top context-menu item. Looks like this: Context-menu

    0 讨论(0)
  • 2020-12-23 18:12

    With Resharper, ALT+SHIFT+L goes to the current file in Solution Explorer.

    0 讨论(0)
  • 2020-12-23 18:13

    Also coming from java (Eclipse), I missed the outline (Class viewer). I have tried many solutions and the best I found is to use the CODEMAID extension.

    It also provides a lot of other tool but you are free not to use it!

    0 讨论(0)
提交回复
热议问题