Eclipse: How do i refresh an entire workspace? F5 doesn't do it

前端 未结 7 1868
小鲜肉
小鲜肉 2020-12-05 01:47

I have a workspace with a bunch of java projects. If I go to File->Refresh, it doesn\'t really refresh anything (perhaps the currently selected project). How

相关标签:
7条回答
  • 2020-12-05 01:59

    It will indeed only refresh the current project (or, more specifically, the current selection in the project explorer). I just click somewhere in the project explorer, do Ctrl+A to select all projects and then press F5 to achieve a complete refresh.

    0 讨论(0)
  • 2020-12-05 01:59

    Easy.

    • Create an external tool: Run > External Tools > External Tools Configuration...
    • Create a new Program configuration Point the location to an exe that is very fast (I use Cygwin's 'ls')
    • On the Refresh tab, choose Refresh Resources upon completion, The Entire Workspace
    • On the Build tab, deselect Build before launch

    Run the tool to refresh all projects.

    0 讨论(0)
  • 2020-12-05 02:03

    If you want to refresh all Projects, ignoring closed projects, then the easiest way is to:

    • ctrl-click and item in the Project Explorer (to ensure the P. Explorer has focus)
    • ctrl-click the item again so that it's no longer highlighted (but the P. Explorer still has focus)
    • F5 will now Refresh the entire workspace

    Effectively F5 refreshes the Workspace when a navigation view has focus and nothing is selected.

    0 讨论(0)
  • 2020-12-05 02:03

    This answer led me to an even simpler solution, no configuration necessary.

    Cmd-3 build all (control-3 on windows)

    Edit: Correction -- I need to both refresh and build. Build does not automatically refresh. I'm currently using two actions, "echo" from my comment in the linked answer I just referred to (an External Tool configuration with a hook to refresh all), followed by cmd-3 "build all"

    0 讨论(0)
  • 2020-12-05 02:14

    Control click all your projects together, then right click and hit refresh.

    Usually I refresh all like that, then i make sure to clean all projects and rebuild in eclipse.

    0 讨论(0)
  • 2020-12-05 02:21

    For anyone curious how to select all of those projects on OS X where Ctrl+A doesn't work:

    1. Click the first project
    2. Hold down Shift
    3. Hold the key until they are all selected
    4. Now press F5
    0 讨论(0)
提交回复
热议问题