對於大型的Java/Maven項目,我有一個新的Emacs設置(在Windows上)。company-emacs-eclim在項目中使用了錯誤的路徑
安裝了Eclipse和eclim(java層更新爲最新版本的spacemacs,作爲額外軟件包安裝的company-emacs-eclim),但是當company-emacs-eclim嘗試自動完成時,它使用錯誤的文件路徑插入該項目文件夾兩次,例如
X:/EclipseWorkspace/Project/Project/src/main/com/company/product/Klass.java
,而不是
X:/EclipseWorkspace/Project/src/main/com/company/product/Klass.java
錯誤消息
Company: An error occurred in auto-begin
Company: backend company-emacs-eclim error "Could not read from "file:///X:/EclipseWorkspace/Project/Project/src/main/com/company/product/Klass.java" because it is a not a file." with args (candidates this)
在eclimd,我得到同樣的消息的異常:
ERROR [org.eclim.command.Main] Command failed
org.apache.commons.vfs.FileSystemException: Could not read from "file:///X:/EclipseWorkspace/Project/Project/src/main/com/company/product/Klass.java" because it is a not a file.
at org.apache.commons.vfs.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1109)
at org.apache.commons.vfs.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:317)
at org.eclim.util.file.FileUtils.byteOffsetToCharOffset(FileUtils.java:75)
at org.eclim.plugin.core.command.AbstractCommand.getOffset(AbstractCommand.java:99)
at org.eclim.plugin.core.command.AbstractCommand.getOffset(AbstractCommand.java:71)
at org.eclim.plugin.core.command.complete.AbstractCodeCompleteCommand.execute(AbstractCodeCompleteCommand.java:60)
at org.eclim.command.Main$1.run(Main.java:100)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4203)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3819)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:687)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
我試着關閉並重新打開工作區在Emacs中打開項目,重新創建整個工作區,所有內容都可以得到相同的結果。
你有沒有解決這個問題?我看到同樣的事情。 – glucas