I had the same problem and I ended up finding out that this seems to be a known bug in DALI (Eclipse Java Persistence Tools) since at least eclipse 3.8 which could cause the save action in the java editor to be extremly slow.
Since this hasn’t been fully resolved in Kepler (20130614-0229) yet and because I don’t need JPT/DALI in my eclipse I ended up manually removing the org.eclipse.jpt
features and plugins.
What I did was:
1.) exit eclipse
2.) go to my eclipse install directory
cd eclipse
and execute these steps:
*nix:
mkdir disabled
mkdir disabled/features disabled/plugins
mv plugins/org.eclipse.jpt.* disabled/plugins
mv features/org.eclipse.jpt.* disabled/features
windows:
mkdir disabled
mkdir disabled\features
mkdir disabled\plugins
move plugins\org.eclipse.jpt.* disabled\plugins
for /D /R %D in (features\org.eclipse.jpt.*) do move %D disabled\features
3.) Restart eclipse.
After startup and on first use eclipse may warn you that you need to reconfigure your content-assist. Do this in your preferences dialog.
Done.
After uninstalling DALI/JPT my eclipse feels good again. No more blocked UI and waiting for seconds when saving a file.