2011-04-07 157 views
3

我使用最新的CDT(加上HgEclipse,ANTLR IDE,PDT和其他一些東西)運行Eclipse Helios(3.6)。它運行很好,直到最近,當我試圖打開使用的CDT的C/C++編輯器的任何文件給出了一個錯誤:Eclipse CDT - 無法打開編輯器:編輯器無法初始化?

Could not open the editor: Editor could not be initialized. 

細節選項給出了這樣的:

java.lang.NullPointerException 
    at java.util.TreeMap.getEntry(TreeMap.java:341) 
    at java.util.TreeMap.get(TreeMap.java:272) 
    at org.eclipse.cdt.internal.core.language.LanguageMappingStore.decodeFileMappings(LanguageMappingStore.java:124) 
    at org.eclipse.cdt.internal.core.language.LanguageMappingStore.decodeMappings(LanguageMappingStore.java:85) 
    at org.eclipse.cdt.core.model.LanguageManager.getLanguageConfiguration(LanguageManager.java:447) 
    at org.eclipse.cdt.internal.core.language.LanguageMappingResolver.computeLanguage(LanguageMappingResolver.java:57) 
    at org.eclipse.cdt.core.model.LanguageManager.getLanguageForFile(LanguageManager.java:587) 
    at org.eclipse.cdt.internal.core.model.TranslationUnit.getLanguage(TranslationUnit.java:726) 
    at org.eclipse.cdt.internal.ui.editor.CEditor.internalDoSetInput(CEditor.java:1405) 
    at org.eclipse.cdt.internal.ui.editor.CEditor.doSetInput(CEditor.java:1358) 
    at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3043) 
    at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) 
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) 
    at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) 
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) 
    at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) 
    at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2606) 
    at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3061) 
    at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3088) 
    at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:798) 
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647) 
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465) 
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) 
    at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313) 
    at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180) 
    at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270) 
    at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) 
    at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473) 
    at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1254) 
    at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1207) 
    at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1606) 
    at org.eclipse.ui.internal.PartStack.add(PartStack.java:497) 
    at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103) 
    at org.eclipse.ui.internal.PartStack.add(PartStack.java:483) 
    at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112) 
    at org.eclipse.ui.internal.EditorSashContainer.addEditor(EditorSashContainer.java:63) 
    at org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorAreaHelper.java:225) 
    at org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAreaHelper.java:213) 
    at org.eclipse.ui.internal.EditorManager.createEditorTab(EditorManager.java:778) 
    at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:677) 
    at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:638) 
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2860) 
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768) 
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760) 
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711) 
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) 
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707) 
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691) 
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682) 
    at org.eclipse.cdt.internal.ui.util.EditorUtility.openInEditor(EditorUtility.java:254) 
    at org.eclipse.cdt.internal.ui.util.EditorUtility.openInEditor(EditorUtility.java:157) 
    at org.eclipse.cdt.internal.ui.util.EditorUtility.openInEditor(EditorUtility.java:141) 
    at org.eclipse.cdt.internal.ui.navigator.OpenCElementAction.run(OpenCElementAction.java:52) 
    at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221) 
    at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185) 
    at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48) 
    at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845) 
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) 
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) 
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) 
    at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843) 
    at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131) 
    at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462) 
    at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235) 
    at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264) 
    at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258) 
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298) 
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258) 
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3540) 
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3161) 
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) 
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) 
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) 
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) 
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) 
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) 
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) 
    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:369) 
    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:616) 
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) 
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) 
    at org.eclipse.equinox.launcher.Main.run(Main.java:1408) 

我我在Ubuntu 10.10(也是x86)上使用Eclipse x86。

如果您認爲這可能是文件本身,您可以通過http://hg.redxdev.com/dyst(用戶名:anon密碼:anon)訪問它們。

非常感謝!

回答

1

好吧,似乎項目配置搞砸了。我刪除了項目文件並重新創建了它,現在它沒事了(刪除.cproject,刪除了對.project中cdt的引用,刪除了/.settings中的cdt文件)

0

當Eclipse試圖在編輯器中顯示屬於已關閉項目的文件。我迫使Eclipse先前終止,並在啓動時嘗試顯示我已關閉的項目的文件。

相關問題