this issue will be fixed in eclipse 3.7 (indigo). while "refresh automatically" does eventually bring resources back into sync, the refresh hook only exists for windows, so on linux and mac os it has to poll the filesystem periodically.
from 3.7 there's a new preference
settings > general > workspace > refresh on access (aka lightweight refresh). this preference causes eclipse to automatically refresh resources when it discovers that they're 'out-of-sync'. when opening, reading or searching files, it'll prevent out-of-sync errors from occurring.
see also: https://bugs.eclipse.org/303517
for starting up there is an option to automatically refresh files in
window -> preferences -> general -> startup and shutdown -> refresh workspace on startup
click it in order to have a "fresh" start in eclipse. :)
version: eclipse 4.12
perhaps you should add a feature request on the eclipse site:
i think it would be a great idea to add a preference for automatically refreshing out of date resources.
yes, refresh on access is long overdue ... those answers to this and similar enquires usually suggested enabling the global auto-refresh, which could take an age for large remote projects. in fact there are those who would say that refresh on access should have been the original (< 3.x) default behaviour ...
i managed to solve this by creating a new "external tool" run config that executes a blank batch file. in the run config, you can have it refresh the workspace when complete. then i created a macro using practically macro that 1) executes the last external tool run config (refreshing the workspace), then 2) executes the last debug run config (running my app). if you uncheck "allocate console" then the completed external tool entry won't show up in the debug window.
a global refresh is really missing in eclipse. the above procedure with selecting all projects and then running refresh (e.g. f5) does not work if you have closed projects included in your selection. this means, if you have 1/2 of your many projects closed as i do, you find yourself manually ctrl-clicking through your dozens of projects. this is quite painful. i wish eclipse would simply ignore closed projects.
there is a global refresh - have nothing (or everything) selected in the package explorer and press f5 (or right-click on empty space and select refresh). of course, this could take rather long if you have large projects.
the global refresh actually exists in plain eclipse without any plugins and without selecting every project in your workspace.
basically you need to deselect everything in your project explorer and hit f5. to do that ctrl+click the selected resource in the project explorer and hit f5.
given that java 7 has an api for filesystem hooks, one would think that refresh could be handled better in eclipse.
edit: actually, there is a plugin that uses this mechanism: https://github.com/psxpaul/eclipsejava7refresher
eclipse helios possesses a built in refresh feature at preferences > general > workspace. it's in the same spot where you disable automatic builds. select refresh automatically. a plugin with the same functionality is andrei loskutov's filesync plugin. the update site address is: http://andrei.gmxhome.de/eclipse/. during installation, select eclipse 3.5-3.7 plugins > filesync.
out of synchronization problem is common in eclipse ide so you have to check this option windows -> preference -> workspace -> refresh using native hooks or polling.
i think if you click on the project node in the project explorer and press f5 or right click and select refresh, all resources for that project will be refreshed. also, if you ctrl+click on multiple projects, you should be able to refresh multiple projects at the same time.
a single click on a project, a ctrl+a to select everything, and an f5 should do exactly what you need - refresh everything.
i'll have to test this when i get the chance, but i believe this is how i overcame similar problems in the past.
i've noticed that this answer routinely is getting down voted. i'd like to point out that the question refers to a specific version of eclipse: 3.4.2. there was actually no automatic method to refresh out-of-sync resources until version 3.7 indigo of eclipse, as mentioned in james blackburn's answer. the method described in this answer is the only method to achieve this in version 3.4.2 (and any other version before 3.7 indigo).
- Can Eclipse refresh resources automatically?
- Can Eclipse automatically refresh Tomcat app?
- Eclipse automatically refresh resources and exclude build dir
- Can eclipse be configured to automatically fix missing Imports?
- Can I generate fields automatically in eclipse from a constructor?
- How can we automatically generate comments for methods written by us in Eclipse RCP?
- How can I share resources between the different Eclipse projects, so as to avoid duplication?
- Can eclipse automatically rename the unit test class when the class under test is renamed?
- How do I configure eclipse to automatically refresh a project as part of it's build?
- Can Eclipse PDT automatically add PHPDoc Blocks to code where needed?
- Eclipse Android won't clean, won't refresh resources
- Can Eclipse automatically generate different DPI images for Android projects?
- How can I keep the Eclipse debugger from automatically expanding the Package Explorer into libraries on exceptions?
- Can eclipse be configured to automatically find sources for jars?
- How can i refresh Eclipse Package explorer with java code?
- How can we automatically disable an Eclipse plug-in on target platforms?
- Can one automatically create javadoc tags for an entire Eclipse project?
- Can Eclipse automatically add all folders labelled src to the build path?
- Can Eclipse or SQL Developer automatically unquote Java Strings?
- How can I create a subclass of an abstract class automatically in Eclipse in Java?
- Eclipse. Can I delete a Java class constructor such that Eclipse automatically refactors?
- How can I prevent Eclipse from automatically switching and creating Run and Debug Configurations?
- How can I make it so Eclipse automatically updates my code in a window as I edit it?
- How can I stop eclipse to modify .classpath automatically
- How can I automatically build multiple Eclipse Plug-In Projects as one Jenkins project?
- Eclipse not automatically refreshing resources in src/main/resources
- Eclipse auto refresh resources
- Eclipse can see resources which do not exist
- How can I make sure Eclipse automatically detects XML files?
- Can I refresh Eclipse Project Explorer automatically?
More Query from same tag
- Spring Framework 4 & Apache Tiles 3 - no such definition error
- java.lang.NoSuchFieldError: ROOT at org.apache.tomcat.util.res.StringManager
- In the Eclipe PMD plugin, can I reference the standard ruleset files?
- Android eclipse DDMS - Can't access data/data/ on phone
- bootclasspath in tomcat
- Eclipse 404 Requested resource not available
- How to run different version of JFreeChart in eclipse?
- Alternative of Jrebel for Hotswap or HotDeployment in Eclipse
- RES_NOT_FOUND in JSF
- How to get rid of collapsable icons in Eclipse?
- Local Storage error with JBoss
- Function.curried not defined
- How to provide dependency injections in Eclipse RCP 3.x?
- How a move-able button when pressed performs something
- Generic type <P> converted to paragraph tag in Javadoc
- Installing OpenGL/Glut libraries in Ubuntu
- Import sun class in Java-Eclipse
- How do I install eclipse PDE?
- Trying to use "android-holo-colors.com" and "AppCompat"
- Eclipse shows nasty white cross in red circle with no message
- How can I solve this error when I try to download e(fx)clipse from Eclipse Marketplace into my Eclipse IDE?
- date string is showing question marks
- Using a local dependency in Eclipse with Ivy / Ant
- During debugging in Eclipse, is it possible to jump to a line and execute it during debugging?
- DeviceMonitor - Sending Tracking request failed
- How the image url is wrriten in java fxml
- Java : how to get the active editor in a thread?
- Feature file executes with an error: Expected scheme-specific part at index 10:
- Coverage fatal error (EclEmma)
- How use debug in Eclipse correctly?