viewer.addDragSupport(DND.DROP_MOVE | DND.DROP_COPY, new Transfer[] {
LocalSelectionTransfer.getTransfer()
}, new DragSourceAdapter() {
@Override
public void dragSetData(DragSourceEvent event) {
LocalSelectionTransfer transfer = LocalSelectionTransfer.getTransfer();
if (transfer.isSupportedType(event.dataType))
transfer.setSelection(viewer.getSelection());
}
});
viewer.addOpenListener(new IOpenListener() {
public void open(OpenEvent event) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();