gpt4 book ai didi

node.js - 比较编辑器不在 node.js 项目上的 eclipse 上工作

转载 作者:行者123 更新时间:2023-12-04 16:46:53 26 4
gpt4 key购买 nike

在 eclipse 的其他实例(PHP、Java)中,我可以使用比较编辑器。

在一个安装了“node.js Developer Tools”的实例中,比较编辑器不显示任何内容(只是一个空白的灰色 View )。相反,错误 View 显示错误 Unhandled event loop exception(见下文)。

当我创建一个新项目时,奇怪的是在同一个 eclipse 实例上,比较编辑器的工作。我完全清理了重新导入工作区的项目(删除 .project、.settings、.tern-project 文件),但问题仍然存在。

未处理的事件循环异常的完整错误消息:

org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
at org.eclipse.jface.text.Position.<init>(Position.java:62)
at org.eclipse.compare.structuremergeviewer.DocumentRangeNode.registerPositionUpdater(DocumentRangeNode.java:115)
at org.eclipse.compare.structuremergeviewer.DocumentRangeNode.<init>(DocumentRangeNode.java:110)
at org.eclipse.wst.jsdt.internal.ui.compare.JavaNode.<init>(JavaNode.java:53)
at org.eclipse.wst.jsdt.internal.ui.compare.JavaParseTreeBuilder.push(JavaParseTreeBuilder.java:139)
at org.eclipse.wst.jsdt.internal.ui.compare.JavaParseTreeBuilder.visit(JavaParseTreeBuilder.java:66)
at org.eclipse.wst.jsdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:368)
at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
at org.eclipse.wst.jsdt.core.dom.ASTNode.acceptChild(ASTNode.java:2473)
at org.eclipse.wst.jsdt.core.dom.TypeDeclarationStatement.accept0(TypeDeclarationStatement.java:213)
at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
at org.eclipse.wst.jsdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2499)
at org.eclipse.wst.jsdt.core.dom.JavaScriptUnit.accept0(JavaScriptUnit.java:242)
at org.eclipse.wst.jsdt.core.dom.ASTNode.accept(ASTNode.java:2426)
at org.eclipse.wst.jsdt.internal.ui.compare.JavaStructureCreator.createStructureComparator(JavaStructureCreator.java:285)
at org.eclipse.wst.jsdt.internal.ui.compare.JavaStructureCreator.createStructureComparator(JavaStructureCreator.java:243)
at org.eclipse.compare.structuremergeviewer.StructureCreator.internalCreateStructure(StructureCreator.java:118)
at org.eclipse.compare.structuremergeviewer.StructureCreator.access$0(StructureCreator.java:106)
at org.eclipse.compare.structuremergeviewer.StructureCreator$1.run(StructureCreator.java:93)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.compare.internal.Utilities.runInUIThread(Utilities.java:805)
at org.eclipse.compare.structuremergeviewer.StructureCreator.createStructure(StructureCreator.java:99)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.createStructure(StructureDiffViewer.java:174)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.refresh(StructureDiffViewer.java:152)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.setInput(StructureDiffViewer.java:123)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged(StructureDiffViewer.java:374)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$2.run(StructureDiffViewer.java:92)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$5.run(StructureDiffViewer.java:349)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged(StructureDiffViewer.java:345)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged(StructureDiffViewer.java:333)
at org.eclipse.wst.jsdt.internal.ui.compare.JavaStructureDiffViewer.compareInputChanged(JavaStructureDiffViewer.java:143)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.inputChanged(StructureDiffViewer.java:302)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:286)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1685)
at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:270)
at org.eclipse.compare.internal.CompareStructureViewerSwitchingPane.setInput(CompareStructureViewerSwitchingPane.java:139)
at org.eclipse.compare.CompareEditorInput.feedInput(CompareEditorInput.java:753)
at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:553)
at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:444)
at org.eclipse.compare.internal.CompareEditor.access$6(CompareEditor.java:404)
at org.eclipse.compare.internal.CompareEditor$1$1.run(CompareEditor.java:361)
at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:58)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:168)
at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:150)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4497)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4110)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

最佳答案

这是比较编辑器结构 View 中的错误。

修复错误之前的解决方法:

从菜单中打开 Window/Preferences 并转到 Node General/Compare/Patch。在那里取消选中选项 Open structure compare automatically:

Open structure compare automatically

这将阻止渲染上层结构比较部分(无论如何对这些文件没有用)但会保持下层并排 View 。

关于node.js - 比较编辑器不在 node.js 项目上的 eclipse 上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46804607/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com