Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Instantly detect external file change

I am using eclipse bndtools plugin to develop OSGi based web application. I am using Eclipse IDE (because of bndtools) and Jetbrain Webstorm IDE to edit the html/css/js files.

When I change files in eclipse, the bndtools refresh the bundle and I can see the changes immediately, but when I edit files using Webstorm I need to refresh the project in eclipse in order to see the result.

NOTE: I have enabled the Eclipse workspace setting Windows > Preferences > General > Workspace > Refresh using native hooks or polling and Refresh on access . But this will only enable eclipse to detect changes when I access the files in eclipse.

To speed up my development, I don't want to refresh the project using eclipse on every changes I make in Webstorm. I am asking if there is a way to avoid it.

Thanks

like image 253
Mohammad Hassany Avatar asked Jun 05 '16 15:06

Mohammad Hassany


People also ask

How to Refresh project in Eclipse?

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.

How do I see previous changes in Eclipse?

In the editor in your eclipse, do this, Right Click -> Replace With -> Local History... From the list of entries in Revision Time, select the revision you want, compare the changes, and if they look okay, replace it. Done!

How do I get the file path in Eclipse?

Another way to quickly (keyboard-free) see the path is to hover over the file type icon (on top of the open editor window). Hovering over doesn't show full path. It shows half path. Such a pity of Eclipse.

How do I view an Eclipse file?

in Eclipse, right-click on your project and select "Properties". With "Resource" selected, it shows "Location:" which is the path to your project. Let's say if you added a folder to your project called Audio, then you could access a mp file like this: new File(".

How to compare external files in Eclipse?

thanks to a tip from john there is another (hidden) way in eclipse to compare external files the trick is described in this article and requires a keyboard shortcut assigned. select the menu window > preferences > general > keys and assign a shortcut key for ‘ compare with other resource ‘:

What is external diff tool in Eclipse?

External diff Tool is an Eclipse plugin that allows the launch of an external diff tool for file compares rather than the default built-in Eclipse diff tool. This plugin doesn't replace the built-in Eclipse tool. It only adds a new menu item to the GUI.

Is there a diff / compare editor in Eclipse?

Eclipse comes with an internal diff / compare editor, but if you prefer a third-party one, this plugin opens an external merge or diff tool for you.

How do I open an external file in PDT?

Opening an External File To open a file by double-clicking: If the file type you are trying to open was associated with PDT during installation, simply double-clicking it in your external file system will cause it to be opened in PDT. If the file type was not associated with PDT you can:


1 Answers

The option "Refresh using native hooks or polling and Refresh on access" just do what you are asking for. The option "Refresh on access" only refresh the file when you access it (when opening the file, or if the file is open in an editor). Tested in Eclipse Photon.

like image 192
dpinya Avatar answered Oct 20 '22 09:10

dpinya