Eclipse not automatically refreshing resources in src/main/resources - eclipse

In my Eclipse preferences, I have "Refresh using native hooks or polling" selected.
If I make a change to a Java file outside of Eclipse, the project that contains that Java file automatically refreshes and rebuilds that file as it should. However, if I make a change to a file under src/main/resources/... from an external editor, it is not automatically refreshed. I have to select the project and press F5 to get it to refresh.
Is there a way to configure Eclipse to automatically refresh any resources under src/main/resources?

In Eclipse
Run > External Tools > External Tools Configuration
Create a new Program configuration Point the location to an exe that is very fast
On the Refresh tab, choose Refresh Resources upon completion, The Entire Workspace
On the Build tab, deselect Build before launch

Related

Include Run Configurations in SVN project in MyEclipse

How can I configure MyEclipse and the SVN plugin (Subclipse 4.3.3) so that my Run Configurations are included in the source code control. Every time a new developer checks out the project, he doesn't have the Run Configurations needed to test the application properly or to do the Maven packaging correctly.
Is there a way?
To share your run/launch configuration, go to the launch configuration (Run > Run Configurations...) tab Common for Save as choose Shared file (instead of Local file).
In addition, you can choose to Display in favorites menu to add it to the drop-down of the corresponding button in the main toolbar.

How to let eclipse refresh the workspace

I write a *bat-script to update my workspace projects to HEAD revision.
The problem is that I stil have to need refresh the workspace in project explorer of eclipse manually.
(Otherwise, new files want shown)
Can I use "External Configuration" or something like that to run my bat and after finished that eclipse refreshes the workspace?
You can use 'Run > External Tools > External Tools Configurations' to configure and run a Program.
This configuration has a 'Refresh' tab where you can configure the refresh action to take when the program finishes.

image won't show in Eclipse dynamic web project

I have a folder containing images under WebContent. If I copy file 1.jpg to images using Windows Explorer, it won't show on my webpage:
document.getelementById("image1").src = "./images/1.jpg"
However, if I right click the project in Eclipse, refresh, then everything works.
How do I remove the need to refresh the project? The images are supposed to be generated by another program dynamically
If something outside of Eclipse modifies the workspace it is always necessary to do a refresh.
However you can configure Eclipse to do this automatically in Preferences > General > Workspace. Check the 'Refresh using native hooks or polling' option.
If the program generating the images is an Eclipse plugin it can use Eclipse APIs to create the files or do the refresh (a normal program cannot do this).
If you run the program using Eclipse Run External Tool configuration there is a Refresh tab that will let you set up the refresh to do when the program terminates.

How can I refresh the eclipse folder with another tool?

I create a web based project with eclipse and the application server is Tomcat and everything is OK, but I have a few files in specific folder that I should change the content of these files with another development environment that it's created by myself, after I change the file's the eclipse doesn't refresh the file and therefore I must go to eclipse, select the folder, press f5 to refresh it.
My Question is that, How can I refresh that specific folder without doing these steps, for example does eclipse have specific API for refresh the folder?
You can use IResource.refreshLocal to refresh a folder (or file).
One way to use this:
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IContainer folder = root.getgetContainerForLocation(new Path("folder path"));
folder.refreshLocal(IResource.DEPTH_INFINITE, null);
This must be run in an Eclipse plugin.
Update:
You can tell Eclipse to refresh automatically in Preferences > General > Workspace by checking the 'Refresh using native hooks or polling' option.
There is no way to force a refresh from a program external to Eclipse.

Where is the "Refresh Automatically" option in Eclipse Kepler for Mac?

My Java project uses JRuby. The Ruby files I execute are resources within the project. I modify those files with an external editor (TextMate). Before I run the project, I need to refresh it. I was looking for a way to have the resources automatically refreshed whenever I run the project, with Eclipse Kepler on Mac:
How do I configure eclipse to automatically refresh a project as part of it's build?
The answer is Window->Preferences->General->Workspace and check "Refresh automatically". However, there is no such thing as "Refresh automatically":
None of the checked options do what I was expecting.
Can Eclipse refresh resources automatically?
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'.
No, that's not true. I run my project (without refreshing it) and Eclipse certainly did not refresh the resources.
A single click on a project, a CTRL+A to select everything, and an F5
should do exactly what you need - refresh everything.
That's what I've been doing. I wouldn't call that "automatic".
Eclipse 'refresh automatically' and Maven build interference
I recently configured Eclipse (ver. 3.6) in order to make it
automatically refresh projects in the workspace (Windows > Preferences > General > Workspace > Refresh Automatically).
What is this mythical "Refresh Automatically" everybody is talking about?
The option was renamed to Refresh using native hooks or polling which is on the Preference page you show.
On the Mac I believe it using polling - so there will be a background thread periodically checking for updates.