[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] CEditor bombs in M5
|
With M5 and CDT20030127 (that's the latest build I could find) I'm getting a NPE in :
Thread [main] (Suspended (exception java.lang.NullPointerException))
org.eclipse.cdt.internal.ui.editor.CEditor(org.eclipse.ui.editors.text.TextEditor).createPartControl(org.eclipse.swt.widgets.Composite) line: 646
org.eclipse.cdt.internal.ui.editor.CEditor.createPartControl(org.eclipse.swt.widgets.Composite) line: 686
org.eclipse.ui.internal.PartPane$4.run() line: 138
org.eclipse.core.internal.runtime.InternalPlatform.run(org.eclipse.core.runtime.ISafeRunnable) line: 867
org.eclipse.core.runtime.Platform.run(org.eclipse.core.runtime.ISafeRunnable) line: 413
org.eclipse.ui.internal.EditorPane(org.eclipse.ui.internal.PartPane).createChildControl() line: 134
org.eclipse.ui.internal.EditorPane(org.eclipse.ui.internal.PartPane).createControl(org.eclipse.swt.widgets.Composite) line: 183
org.eclipse.ui.internal.EditorWorkbook.createPage(org.eclipse.ui.internal.EditorPane) line: 393
org.eclipse.ui.internal.EditorWorkbook.add(org.eclipse.ui.internal.LayoutPart) line: 95
org.eclipse.ui.internal.EditorArea.addEditor(org.eclipse.ui.internal.EditorPane) line: 49
org.eclipse.ui.internal.EditorPresentation.openEditor(org.eclipse.ui.IEditorReference, boolean) line: 352
org.eclipse.ui.internal.EditorManager$2.run() line: 556
It looks like createPartControl() is being called before createSourceViewer() so the decoration support is not initialized. It worked ok in M4. Before I spend a lot of time trying to debug it, has anybody else run into this problem?
I'm creating the editor page in a plug-in like this:
IEditorRegistry registry= PlatformUI.getWorkbench().getEditorRegistry();
IEditorDescriptor desc = registry.getDefaultEditor(fileName);
IEditorInput input = new ExternalEditorInput(storage);
IEditorPart editor = page.openEditor(input, desc.getId());