Project

General

Profile

Revision 94fc8cbb

ID94fc8cbb53b1ef7ee31d34340488d5b6be40bc6e
Parent 18bcaf4b
Child a229f63f

Added by Patrick Plitzner about 3 years ago

ref #6931 Migrate dnd for uses view

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/uses/e4/UsesViewPartE4.java
20 20

  
21 21
import eu.etaxonomy.cdm.model.common.CdmBase;
22 22
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
23
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDragListener;
24
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementDropAdapter;
23 25
import eu.etaxonomy.taxeditor.editor.view.descriptive.DescriptionElementTransfer;
24 26
import eu.etaxonomy.taxeditor.editor.view.descriptive.e4.FactualDataPartE4;
25 27
import eu.etaxonomy.taxeditor.editor.view.uses.UsesContentProvider;
......
49 51
        treeViewer.setLabelProvider(new UsesLabelProvider());
50 52
        treeViewer.setAutoExpandLevel(2);
51 53

  
52
        viewer = treeViewer;
54
        Transfer[] transfers = new Transfer[] { DescriptionElementTransfer.getInstance() };
55
        treeViewer.addDragSupport(dndOperations, transfers, new DescriptionElementDragListener(
56
                this));
57
        treeViewer.addDropSupport(dndOperations, transfers,
58
                new DescriptionElementDropAdapter(treeViewer));
53 59

  
54 60

  
55
        //FIXME E4 migrate drag and drop
56
        Transfer[] transfers = new Transfer[] { DescriptionElementTransfer.getInstance() };
57
//      viewer.addDragSupport(dndOperations, transfers, new DescriptionElementDragListener(
58
//              this));
59
//      viewer.addDropSupport(dndOperations, transfers,
60
//              new DescriptionElementDropAdapter(viewer));
61 61

  
62 62
        // Propagate selection from viewer
63 63
        selectionChangedListener = (event -> selService.setSelection(AbstractUtility.getElementsFromSelectionChangedEvent(event)));
64
        viewer.addSelectionChangedListener(selectionChangedListener);
64
        treeViewer.addSelectionChangedListener(selectionChangedListener);
65 65

  
66 66
        //FIXME E4 migrate toggle actions
67 67
//        showAllElementsAction = new ToggleDescriptionAction(false);
68 68
//        hideAllElementsAction = new ToggleDescriptionAction(true);
69 69

  
70 70
        //create context menu
71
        menuService.registerContextMenu(viewer.getControl(), "eu.etaxonomy.taxeditor.editor.popupmenu.usesView");
71
        menuService.registerContextMenu(treeViewer.getControl(), "eu.etaxonomy.taxeditor.editor.popupmenu.usesView");
72

  
73
        viewer = treeViewer;
72 74

  
73 75
        //FIXME E4 implement toolbar
74 76
//        createToolbar();

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)