Eclipse卡在搜索对话框中

时间:2013-09-03 13:06:12

标签: eclipse scala-ide

我的项目名为MyProject,当我在eclipse中按 Ctrl + H 搜索我的项目时,我弹出以下错误:

Search Dialog Problem
  An error occurred while creating the search page "Java Search"
  Reason:
  MyProject does not exist

当我查看日志时,我发现以下内容:

!ENTRY org.eclipse.search 4 1 2013-09-03 14:58:19.272
!MESSAGE Internal Error
!STACK 1
Java Model Exception: Java Model Status [MyProject does not exist]
    at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:505)
    at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:246)
    at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
    at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
    at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
    at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
    at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:504)
    at org.eclipse.jdt.internal.core.CompilationUnit.openAncestors(CompilationUnit.java:1170)
    at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:240)
    at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:518)
    at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:255)
    at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:241)
    at scala.tools.eclipse.javaelements.LazyToplevelClass.mirror$lzycompute(ScalaElements.scala:302)
    at scala.tools.eclipse.javaelements.LazyToplevelClass.mirror(ScalaElements.scala:300)
    at scala.tools.eclipse.javaelements.LazyToplevelClass.exists(ScalaElements.scala:314)
    at org.eclipse.jdt.internal.ui.search.JavaSearchPage$SearchPatternData.create(JavaSearchPage.java:189)
    at org.eclipse.jdt.internal.ui.search.JavaSearchPage.readConfiguration(JavaSearchPage.java:1112)
    at org.eclipse.jdt.internal.ui.search.JavaSearchPage.createControl(JavaSearchPage.java:518)
    at org.eclipse.search.internal.ui.SearchDialog$9.run(SearchDialog.java:710)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.search.internal.ui.SearchDialog$8.run(SearchDialog.java:705)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.search.internal.ui.SearchDialog.createPageControl(SearchDialog.java:703)
    at org.eclipse.search.internal.ui.SearchDialog.createPageArea(SearchDialog.java:418)
    at org.eclipse.search.internal.ui.util.ExtendedDialogWindow.createDialogArea(ExtendedDialogWindow.java:140)
    at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
    at org.eclipse.jface.window.Window.create(Window.java:431)
    at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
    at org.eclipse.search.internal.ui.SearchDialog.create(SearchDialog.java:281)
    at org.eclipse.jface.window.Window.open(Window.java:790)
    at org.eclipse.search.internal.ui.OpenSearchDialogAction.run(OpenSearchDialogAction.java:54)
    at org.eclipse.search.internal.ui.OpenSearchDialogAction.run(OpenSearchDialogAction.java:45)
    at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
    at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1262)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1104)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1100)
    at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1509)
    at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4640)
    at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4528)
    at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
!SUBENTRY 1 org.eclipse.jdt.core 4 969 2013-09-03 14:58:19.272
!MESSAGE MyProject does not exist

当然,我试图在eclipse上删除我的项目,然后再次导入它,但它没有解决这个问题。更糟糕的是,所有其他项目都有相同的错误,指的是该项目,即使它不再在工作区中。

知道它来自哪里?

1 个答案:

答案 0 :(得分:0)

当我在命令行中执行git命令时,Eclipse进入了这种状态。 (切换分支或拉动更改。)我认为它与Scala-IDE进行了一些交互。

通常不会出现查找对话框。但是,如果确实显示Java面板是空白的,并且在尝试关闭此模式对话框时,从事件循环内部触发异常并且窗口拒绝关闭。

我的决议是:

  1. 重新创建错误消息中提到的缺失项目。
  2. 再次尝试查找,阅读邮件。 (如果“查找”对话框未关闭,请终止Eclipse。)
  3. 在第2步预期的位置创建一个空文件(例如Data2
  4. 然后问题就消失了,我可以再次删除虚拟项目。