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 do I get eclipse to refresh all of the projects?
-
See also: http://stackoverflow.com/questions/1212633/can-eclipse-refresh-resources-automatically/1212650#1212650 – Drew Stephens Feb 22 '11 at 17:33
7 Answers
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.

- 1,082,665
- 372
- 3,610
- 3,555
-
7Ok, thanks, but note that doing the above in the "Project Explorer" doesn't work (refresh is grayed out), but doing it in the "Package Explorer" it worked fine. – Jack Mar 25 '10 at 19:47
-
9Problem with this is though, that if any of my projects are closed (which is all the time), the Refresh option does not appear. The only way Ctrl+A followed by F5 works for me is if all my projects are open. – Matt Feb 21 '11 at 10:19
-
10@Matt: My Project Explorer is configured to hide closed projects. They are only visible in Navigator. You might want to do the same. – BalusC Feb 21 '11 at 10:23
-
I guess this is the only way? but it is not elegant. requires opening all projects. – Trevor Boyd Smith Jun 10 '11 at 17:07
-
2@Trevor: no as BalusC said you can hide closed projects... again which is not always desirable.. What I ended up doing is actually set "Top Level Elements" to Working Sets which are never closed, so Ctrl+A always works... as well as keeping my workspace more organised..especially with the Dynamic Working Sets plugin(which means no maintenance after setting up some regexes). – inger Jan 04 '12 at 17:01
-
@Matt: I get around this by doing Ctrl+A, then holding Ctrl left-click closed projects to exclude them. Then it works. – user443854 Feb 09 '12 at 14:44
-
1If you go the filter out closed project route, the instructions to do that are here http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jst.j2ee.doc.user%2Ftopics%2Fcjviewfilters.html – Everett Toews Sep 19 '12 at 15:15
-
Note that _ctrl-a_ does not always work in Project explorer, [bug 281966](https://bugs.eclipse.org/bugs/show_bug.cgi?id=281966). Either select (all) items by ctrl/shift or select none, then press F5, as described in other answer(s). – David Balažic Jul 15 '14 at 13:19
-
1This answer of selecting **all** projects in the explorer and hitting _F5_ seems strictly inferior to the answer by @blackburn below, of selecting **none**. Because selecting none will work even if there are closed projects and it will also refresh the workspace itself. – leorleor Feb 17 '15 at 21:22
-
You should collapse all projects in Project Explorer to be able to refresh them. If you have any uncollapsed project and then use `Ctrl + A` to select all, the refresh will be disappear. – Arashsoft Mar 03 '16 at 15:38
-
-
8 years later, I'm using Oxygen and this answer still holds. Thanks much! – Hildy Apr 17 '18 at 04:49
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.

- 4,492
- 2
- 27
- 24
-
3This worked well for me on a Mac substituting cmd-click for ctrl-click – Traveler Sep 10 '14 at 00:20
-
1This is a great workaround for when you have many projects and folders (since ctrl-A right-click doesn't allow refresh if folders are selected) – kotoole Feb 02 '17 at 19:28
Ctrl-A, then F5.
You can set up the workspace to automatically refresh when it detects changes in the preferences. (Window > Preferences > General > Workspace > Refresh Automatically)

- 8,582
- 2
- 31
- 44
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.

- 500
- 3
- 9
-
-
-
This is great! I'm now able to type cmd-3 echo (because I used /bin/echo as the command) and immediately refresh, making it much less of a burden to skip the performance-wrecking autobuilds. Because it gets a menu item, it could also go in a quicksilver trigger or similar setup, so it could be a global keystroke from outside eclipse. – Joshua Goldberg May 29 '15 at 20:02
-
This led me to something even simpler: cmd-3 build all. (posting as an answer) – Joshua Goldberg Jun 01 '15 at 17:30
-
Apologizing for the noise: I've found I have to refresh first and then build. Neither alone is sufficient. (I'd mistakenly thought both actually, that refreshing triggered builds, and that building would start with a refresh. Neither is true.) I use an external tool config with a refresh hook first, and then cmd-3 build all. – Joshua Goldberg Jun 04 '15 at 17:30
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.

- 1,479
- 2
- 10
- 16
For anyone curious how to select all of those projects on OS X where Ctrl+A doesn't work:
- Click the first project
- Hold down Shift
- Hold the ↓ key until they are all selected
- Now press F5

- 159,648
- 54
- 349
- 530
-
1
-
It works for me inconsistently (I sometimes have to click around the Project Explorer a few times first). – Max Nanasy Jun 05 '13 at 05:37
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"

- 1
- 1

- 5,059
- 2
- 34
- 39