Community
Participate
Working Groups
In all 2.x and 3.x versions of Eclipse, the SWT Designer team has been successfully subclassing org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor. Obviously, this is internal code we are dabbling with, and we understand there are no commitments to backward compatibility, but this was the only way that we could, at the time, provide a tabbed editor with one tab that provides a rich java editing experience without having to reinvent/copy the existing JDT java editor. When SWT Designer is run in e4, I get the following exception (see below). What is the recommended way for us to embed one editor in a tab of another editor? Is this "composing" or "grouping" of editors something we want to support in e4, where each secondary tab provides a different view of the same underlying resource? It would be nice that if I open a different editor type on the same underlying resource, they all appear under the same primary tab but have different secondary tabs so that I visually "know" that I'm editing the same underlying resource. If we had that type of visual editor grouping, then SWT Designer would not need to subclass the existing JDT compilation unit editor any longer. java.lang.NullPointerException at org.eclipse.ui.internal.EditorSiteDragAndDropServiceImpl.addMergedDropTarget(EditorSiteDragAndDropServiceImpl.java:165) at org.eclipse.ui.texteditor.AbstractTextEditor.installTextDragAndDrop(AbstractTextEditor.java:3580) at org.eclipse.ui.texteditor.AbstractTextEditor.initializeDragAndDrop(AbstractTextEditor.java:3178) at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3265) at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:53) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:432) at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.createPartControl(JavaEditor.java:3104) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl(CompilationUnitEditor.java:1475) at com.instantiations.designer.core.editor.multi.MultiPageEditor.super_createPartControl(MultiPageEditor.java:137) at com.instantiations.designer.core.editor.multi.SourcePage.createControl(SourcePage.java:66) at com.instantiations.designer.core.editor.multi.DefaultMultiMode.createTab(DefaultMultiMode.java:56) at com.instantiations.designer.core.editor.multi.MultiPagesMode.create(MultiPagesMode.java:74) at com.instantiations.designer.core.editor.multi.MultiPageEditor.createPartControl(MultiPageEditor.java:68) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:115) at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:48) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:168) 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.e4.core.internal.di.MethodRequestor.callMethod(MethodRequestor.java:57)
I'm rather surprised by the NPE personally. We should probably actually fix the code so that it gets the right workbench window instead of just asking for it from the workbench.
(In reply to comment #1) > I'm rather surprised by the NPE personally. For example, the PDE editors come up just fine and they nest a text editor in their editor.
Is this still an issue ?
It works fine in RC0... Thanks!