|
87 | 87 | import org.eclipse.swt.custom.CTabFolder2Listener;
|
88 | 88 | import org.eclipse.swt.custom.CTabFolderEvent;
|
89 | 89 | import org.eclipse.swt.custom.CTabItem;
|
| 90 | +import org.eclipse.swt.dnd.DND; |
| 91 | +import org.eclipse.swt.dnd.DropTarget; |
90 | 92 | import org.eclipse.swt.events.ControlEvent;
|
91 | 93 | import org.eclipse.swt.events.ControlListener;
|
92 | 94 | import org.eclipse.swt.events.MouseAdapter;
|
|
113 | 115 | import org.eclipse.swt.widgets.ToolBar;
|
114 | 116 | import org.eclipse.swt.widgets.ToolItem;
|
115 | 117 | import org.eclipse.swt.widgets.Widget;
|
| 118 | +import org.eclipse.ui.IWorkbenchWindow; |
| 119 | +import org.eclipse.ui.PlatformUI; |
116 | 120 | import org.osgi.service.event.Event;
|
117 | 121 | import org.osgi.service.event.EventHandler;
|
118 | 122 |
|
@@ -158,6 +162,8 @@ public class StackRenderer extends LazyStackRenderer {
|
158 | 162 | */
|
159 | 163 | private static final String TAB_FONT_KEY = "org.eclipse.ui.workbench.TAB_TEXT_FONT"; //$NON-NLS-1$
|
160 | 164 |
|
| 165 | + private static final int DROP_OPERATIONS = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; |
| 166 | + |
161 | 167 | @Inject
|
162 | 168 | @Preference(nodePath = "org.eclipse.e4.ui.workbench.renderers.swt")
|
163 | 169 | private IEclipsePreferences preferences;
|
@@ -719,6 +725,9 @@ public Object createWidget(MUIElement element, Object parent) {
|
719 | 725 | if (PartStackUtil.isEditorStack(element)) {
|
720 | 726 | createOnboardingControls(tabFolder);
|
721 | 727 | initializeOnboardingInformationInEditorStack(tabFolder);
|
| 728 | + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); |
| 729 | + Shell shell = window.getShell(); |
| 730 | + new DropTarget(shell, DROP_OPERATIONS); |
722 | 731 | }
|
723 | 732 | tabFolder.setMRUVisible(getMRUValue());
|
724 | 733 |
|
|
0 commit comments