Refreshing files in Eclipse

79 views
Skip to first unread message

Tad Fisher

unread,
Oct 31, 2012, 8:46:24 PM10/31/12
to emacs...@googlegroups.com
I've started using emacs-eclim at my day job, which is working on J2EE projects that are served via an embedded Tomcat instance. A big slowdown compared to working in straight Eclipse is that the changes I make aren't automatically reflected on the Eclipse side. I'm not sure if this is supposed to automatically happen or not.

As of now, I do one of two things to "push" my changes to Eclipse:
- Switch to the Eclipse window, right-click on the project, and hit "Refresh"
- Run M-x eclim-project-update, enter my project name, hit Enter, and wait (the call appears to be synchronous)

Is there an alternative that I am overlooking? I'm hesitant to add to the after-save-hook when I have to wait several seconds after each save. If the call were made asynchronously, however...

fred-o

unread,
Nov 13, 2012, 2:17:20 PM11/13/12
to emacs...@googlegroups.com
IIRC I experimented a bit with async source updates a while ago, but couldn't get it working properly. The reason it's tricky is that the save+update usually happens right before we call eclim to do some operation that requires eclipse to have the latest version of the source, and we want to be sure that the update has completed before doing the second call.

At least, that's my rationale :) There may well be a better way of doing it, and I haven't really looked at how the vim guys do it. It could be that this is a saved problem already. I encourage you to tinker around with it a bit and see if you can come up with something. Starting points would be eclim--execute-command-internal (which triggers the source update under certain circumstances), eclim/java-src-update (which saves necessary files) and the after-save-hook (which actually does the work of calling eclim with the update command).

I too am working in a large J2EE project and was really feeling the pain of long eclipse build times. What I ended up doing was stripping down eclipse to the bare minimum and only running those plugins and builders that were absolutely essential. Removing the Spring IDE made a *huge* difference.

Cheers,
-- Fredrii
 
Reply all
Reply to author
Forward
0 new messages