Hi!
There are several situations where I get such an Exception while doing a :JavaCorrect in (G)Vim.
The first is, if I open the java file in Vim and then I start Eclipse with embedded eclimd-view.
The second method to reproduce is to have the same file open in Vim and in Eclipse, then do a QuickFix in Eclipse. Every :JavaCorrect in Vim from that time on will result in the said Exception. It first stops coming if I restart the eclimd-view in Eclipse.
What happens in detail? Let's assume, I have a minimal Java file.
import java.util.ArrayList;
public class TestClass {
ArrayList al = new ArrayList();
}
I force a QuickFix situation by deleting the
import-line, then the line with ArrayList will ask me to insert the
import-line again.
As I said, if I've done one of the two steps I explained above, then :JavaCorrect will show me the option to import the module and if I enter on it, it will produce the following error on the statusline:
Java Model Exception: Java Model Status [Update conflict]
while executing command (port: 9091): -editor vim -command java_correct -p "TestCase" -f "src/TestClass.java" -l 2 -o 25 -e utf-8 -a 0
The import-line will be inserted, though, but I have to reload the file to see it.
With
:let g:EclimLogLevel = 10, it says
Java Model Exception: Java Model Status [Update conflict]
^Iat org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:784)
^Iat org.eclipse.jdt.internal.core.CompilationUnit.commitWorkingCopy(CompilationUnit.java:391)
^Iat org.eclim.plugin.jdt.util.JavaUtils.format(JavaUtils.java:565)
^Iat org.eclim.plugin.jdt.command.correct.CodeCorrectCommand.apply(CodeCorrectCommand.java:345)
^Iat org.eclim.plugin.jdt.command.correct.CodeCorrectCommand.execute(CodeCorrectCommand.java:135)
^Iat org.eclim.command.Main$1.run(Main.java:98)
^Iat org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
^Iat org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
^Iat org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3529)
^Iat org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3182)
^Iat org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1029)
^Iat org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
^Iat org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:923)
^Iat org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
^Iat org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
^Iat org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
^Iat org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
^Iat org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
^Iat org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
^Iat org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
^Iat org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
^Iat org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
^Iat org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
^Iat org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
^Iat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
^Iat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
^Iat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
^Iat java.lang.reflect.Method.invoke(Method.java:616)
^Iat org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
^Iat org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
^Iat org.eclipse.equinox.launcher.Main.run(Main.java:1438)
^Iat org.eclipse.equinox.launcher.Main.main(Main.java:1414)
while executing command (port: 9091): -editor vim -command java_correct -p "TestCase" -f "src/TestClass.java" -l 2 -o 25 -e utf-8 -a 0
Any suggestions on that?
I use Gentoo Linux with (G)Vim 7.3+ and Eclipse Juno (4.2), current version of eclim (v2.2.3).