Project

General

Profile

Actions

task #8159

open

Replace LocalSelectionTransfer for DnD operations

Added by Patrick Plitzner almost 4 years ago. Updated about 3 years ago.

Status:
New
Priority:
New
Assignee:
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
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);
    }
Actions #1

Updated by Katja Luther about 3 years ago

  • Assignee changed from Patrick Plitzner to Katja Luther
Actions

Also available in: Atom PDF