|
89 | 89 | import org.eclipse.swt.custom.CTabItem; |
90 | 90 | import org.eclipse.swt.dnd.DND; |
91 | 91 | import org.eclipse.swt.dnd.DropTarget; |
| 92 | +import org.eclipse.swt.dnd.TextTransfer; |
| 93 | +import org.eclipse.swt.dnd.Transfer; |
92 | 94 | import org.eclipse.swt.events.ControlEvent; |
93 | 95 | import org.eclipse.swt.events.ControlListener; |
94 | 96 | import org.eclipse.swt.events.MouseAdapter; |
@@ -721,11 +723,21 @@ public Object createWidget(MUIElement element, Object parent) { |
721 | 723 | int styleOverride = getStyleOverride(pStack); |
722 | 724 | int style = styleOverride == -1 ? SWT.BORDER : styleOverride; |
723 | 725 | CTabFolder tabFolder = new CTabFolder(parentComposite, style); |
| 726 | +// if (PartStackUtil.isEditorStack(element)) { |
| 727 | +// createOnboardingControls(tabFolder); |
| 728 | +// initializeOnboardingInformationInEditorStack(tabFolder); |
| 729 | +// Shell shell = Display.getCurrent().getActiveShell(); |
| 730 | +// new DropTarget(shell, DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK); |
| 731 | +// } |
| 732 | + |
724 | 733 | if (PartStackUtil.isEditorStack(element)) { |
725 | 734 | createOnboardingControls(tabFolder); |
726 | 735 | initializeOnboardingInformationInEditorStack(tabFolder); |
727 | | - Shell shell = Display.getCurrent().getActiveShell(); |
728 | | - new DropTarget(shell, DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK); |
| 736 | + Label dropLabel = new Label(tabFolder, SWT.NONE); |
| 737 | + dropLabel.setText("Drop here"); //$NON-NLS-1$ |
| 738 | + int drop = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; |
| 739 | + DropTarget target = new DropTarget(dropLabel, drop); |
| 740 | + target.setTransfer(new Transfer[] { TextTransfer.getInstance() }); // or FileTransfer, etc. |
729 | 741 | } |
730 | 742 | tabFolder.setMRUVisible(getMRUValue()); |
731 | 743 | // Adjust the minimum chars based on the location |
|
0 commit comments