I created a plug-in to hook into the save action and create a miniature javascript file for the editable javascript file. You can see the full code in this question: the eclipse plugin does not work after upgrading to juno (eclipse 4)
The problem is that with Juno, this plugin creates endless loops in the process of building a workspace. First, it starts to reduce the file, which I did not change at all. This file creates an endless loop in the assembly. When he finished the file thumbnail, he will start a new build of the workspace and close the file again and so on. But after a while it gets worse, especially at the new eclipse. Suddenly there are a dozen files that it reduces, I never touched. If I remove my plugin, let eclipse build the workspace, reconnect its plug-in again. But after some time it all begins.
I think this is due to the way I process the task to create the file, as shown below. Maybe something has changed here with Juno? But I can not find any information about this.
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();
source share