I have created a plug-in to hook into the save action and create a minified javascript file of an edited javascript file. You can see the full code in this question: eclipse plugin does not work after update to juno (eclipse 4)
Problem is that since Juno this plug-in creates endless loops in the workspace building process. It first starts to minify a file I did not change at all. This file creates an endless loop in the build. When it finished minifing the file it starts a new workspace build and minifies the file again and so on. But this gets even worse after some time, especially on a new eclipse start. Suddenly there are a dozen of files it minifies I have never touched. If I uninstall my plugin, then let eclipse build the workspace, reinstall my plug-in it works again. But after a while this starts all over.
I think it is related to the way I handle the job to create the file, see below. Maybe something has changed here with Juno? But I fail to find any information about that.
Job compileJob = new Job("Compile .min.js") {
public IStatus run(IProgressMonitor monitor) {
public IStatus run(IProgressMonitor monitor) {
byte[] bytes = null;
try {
bytes = CallCompiler.compile(fullLocation.toString(), CallCompiler.SIMPLE_OPTIMIZATION).getBytes();
InputStream source = new ByteArrayInputStream(bytes);
if (!newFile.exists()) {
newFile.create(source, IResource.NONE, null);
} else {
newFile.setContents(source, IResource.NONE, null);
}
} catch (IOException e) {
e.printStackTrace();
} catch (CoreException e) {
e.printStackTrace();
}
return Status.OK_STATUS;
}
};
compileJob.setRule(newFile.getProject());
compileJob.schedule();