Project

General

Profile

task #8159

Replace LocalSelectionTransfer for DnD operations

Added by Patrick Plitzner 3 months ago.

Status:
New
Priority:
New
Category:
taxeditor
Target version:
Start date:
03/04/2019
Due date:
% Done:

0%

Severity:
normal

Description

Using LocalSelectionTransfer is in most cases too generic. It is better to define an own TransferData and assign the dragged data to the event in DragSourceAdapter.dragSetData()

    @Override
    public void dragSetData(DragSourceEvent event) {
        event.data = dragData;
    }

If LocalSelectionTransfer is used make sure to set the selection to null when the operation is done in DragSourceAdapter.dragFinished()

    @Override
    public void dragFinished(DragSourceEvent event) {
        super.dragFinished(event);
        LocalSelectionTransfer.getTransfer().setSelection(null);
    }

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)