javascript – Eclipse Mars – 一个特定的文件无法在比较编辑器中打开?

前端之家收集整理的这篇文章主要介绍了javascript – Eclipse Mars – 一个特定的文件无法在比较编辑器中打开?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
上周突然间,单个 javascript文件将不再在比较编辑器中打开.

>我正在运行最新的Mars Eclipse
>我正在运行最新的Subclipse
>我与repo同步,并查看更改的文件
>当我双击或选择比较时,我会看到一个空白的白页,其中包含“正在初始化…”或空白的灰色页面
>它只有一个特定的文本.js文件…项目中的所有其他文件,以及其他项目差异很好.
>该文件是37,880字节
>我删除了subversion设置文件,并重新创建了它们
>我检查了首选项并忽略了空格

它只是这个ONE文件……它是node.js项目的主文件.它过去常常很好,上周突然间这个文件将不再差异并抛出此异常.

当我查看日志时,我看到以下异常:

!ENTRY org.eclipse.ui 4 0 2016-04-14 12:38:08.535
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.IllegalArgumentException)
at org.eclipse.swt.SWT.error(SWT.java:4491)
at org.eclipse.swt.SWT.error(SWT.java:4406)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4155)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3772)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

Caused by: java.lang.IllegalArgumentException
at org.eclipse.wst.jsdt.core.dom.ASTNode.setSourceRange(ASTNode.java:2490)
at org.eclipse.wst.jsdt.core.dom.ASTConverter.convertToVariableDeclarationStatement(ASTConverter.java:2696)
at org.eclipse.wst.jsdt.core.dom.ASTConverter.checkAndAddMultipleLocalDeclaration(ASTConverter.java:319)
at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:436)
at org.eclipse.wst.jsdt.core.dom.ASTConverter.convert(ASTConverter.java:1175)
at org.eclipse.wst.jsdt.core.dom.JavaScriptUnitResolver.convert(JavaScriptUnitResolver.java:262)
at org.eclipse.wst.jsdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:887)
at org.eclipse.wst.jsdt.core.dom.ASTParser.createAST(ASTParser.java:647)
at org.eclipse.wst.jsdt.internal.ui.compare.JavaStructureCreator.createStructureComparator(JavaStructureCreator.java:284)
at org.eclipse.wst.jsdt.internal.ui.compare.JavaStructureCreator.createStructureComparator(JavaStructureCreator.java:243)
at org.eclipse.compare.structuremergeviewer.StructureCreator.internalCreateStructure(StructureCreator.java:121)
at org.eclipse.compare.structuremergeviewer.StructureCreator.access$0(StructureCreator.java:109)
at org.eclipse.compare.structuremergeviewer.StructureCreator$1.run(StructureCreator.java:96)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.compare.internal.Utilities.runInUIThread(Utilities.java:859)
at org.eclipse.compare.structuremergeviewer.StructureCreator.createStructure(StructureCreator.java:102)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.createStructure(StructureDiffViewer.java:155)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.refresh(StructureDiffViewer.java:133)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$StructureInfo.setInput(StructureDiffViewer.java:104)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged(StructureDiffViewer.java:342)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$2.run(StructureDiffViewer.java:74)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer$6.run(StructureDiffViewer.java:322)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged(StructureDiffViewer.java:319)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.compareInputChanged(StructureDiffViewer.java:307)
at org.eclipse.wst.jsdt.internal.ui.compare.JavaStructureDiffViewer.compareInputChanged(JavaStructureDiffViewer.java:143)
at org.eclipse.compare.structuremergeviewer.StructureDiffViewer.inputChanged(StructureDiffViewer.java:278)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:292)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1701)
at org.eclipse.compare.CompareViewerSwitchingPane.setInput(CompareViewerSwitchingPane.java:277)
at org.eclipse.compare.internal.CompareStructureViewerSwitchingPane.setInput(CompareStructureViewerSwitchingPane.java:132)
at org.eclipse.compare.CompareEditorInput.FeedInput(CompareEditorInput.java:747)
at org.eclipse.compare.CompareEditorInput.createContents(CompareEditorInput.java:555)
at org.eclipse.compare.internal.CompareEditor.createCompareControl(CompareEditor.java:462)
at org.eclipse.compare.internal.CompareEditor.access$6(CompareEditor.java:422)
at org.eclipse.compare.internal.CompareEditor$3.run(CompareEditor.java:378)
at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:162)
at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:154)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
… 23 more

解决方法

我没有解决方案,但我遇到了同样的问题并找到了解决方法.我在“常规”下的日食偏好中关闭了“自动打开结构比较” – > “比较/补丁”.然后我就可以在比较编辑器中打开文件了.

猜你在找的JavaScript相关文章