I want to refresh eclipse from the command line. How can I do this?
Typically I run builds like this:
$ myCompaniesSpecialBuildScript.sh
This does some project setup that is needed for Eclipse to display a project without compilation errors.
This means that whenever I run a build my steps are:
$ myCompaniesSpecialBuildScript.sh
Inside eclipse:
Refresh
, OR Project -> Clean... -> Clean all
Ideally, rather than doing this I would much rather run this from the command line:
$ myCompaniesSpecialBuildScript.sh && myScriptToRefreshEclipse.sh
I am looking into how to make myScriptToRefreshEclipse.sh
.
This is what I have found so far:
It seems like both of these things need to run inside Eclipse's JVM. Is there a way to get this from the command line?
A fully working command-line Terminal inside Eclipse. Just press Ctrl+Alt+T to open a local command prompt (Terminal).
When a new file is created in Eclipse you might need to refresh the Eclipse project to see the new file. This refresh process can take place automatically. To set auto-refresh, go to window → preferences → general → workspace and check the "Refresh using native hooks or polling" check-box.
In your workspace Preferences, enable General > Workspace > Refresh using native hooks or polling. That should cause Eclipse to automatically refresh the workspace resources when it is started the first time after they've been modified.
Although not a direct answer to the question, I believe the best integration with Eclipse can be achieved by running even the shell script from within Eclipse: Create an External Tool Configuration filling in the path to your script file, and then visit the "Refresh" tab to select which parts of the workspace should be refreshed after running the script.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With