Project

General

Profile

« Previous | Next » 

Revision 954a2c0e

Added by Patrick Plitzner about 8 years ago

  • added feedback if drag&drop in DerivateVie does not work

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/DerivateDropListener.java
74 74
                    LocalSelectionTransfer.getTransfer().setSelection(null);
75 75
                    return true;
76 76
                }
77
                else{
78
                    AbstractUtility.warningDialog("Moving derivate not possible!", derivateView, "Could not move "+draggednode.getValue()+" to "+targetNode.getValue());
79
                }
77 80
            }
78 81
        }
79 82
        return false;
......
105 108
            //check if type is a sub derivate type
106 109
            if(!fromParentNode.equals(targetNode)//don't drag on direct parent node
107 110
                    && fromParentSpecimen instanceof SpecimenOrObservationBase<?>){
108
                occurrenceService.moveDerivate((SpecimenOrObservationBase<?>)fromParentSpecimen, targetSpecimen, draggedSpecimen);
109
                return true;
111
                return occurrenceService.moveDerivate((SpecimenOrObservationBase<?>)fromParentSpecimen, targetSpecimen, draggedSpecimen);
110 112
            }
111 113
        }
112 114

  
......
114 116
        else if(draggedNodeValue instanceof SingleRead && targetNodeValue instanceof Sequence){
115 117
            SingleRead singleRead = (SingleRead) draggedNodeValue;
116 118
            if(fromParentSpecimen instanceof Sequence){
117
                CdmStore.getService(ISequenceService.class).moveSingleRead((Sequence)fromParentSpecimen, (Sequence)targetNodeValue, singleRead);
119
                return CdmStore.getService(ISequenceService.class).moveSingleRead((Sequence)fromParentSpecimen, (Sequence)targetNodeValue, singleRead);
118 120
            }
119
            return true;
120 121
        }
121 122

  
122 123
        // drag'n'drop for Sequence
123 124
        else if(draggedNodeValue instanceof Sequence && targetNodeValue instanceof DnaSample ){
124 125
            Sequence sequence = (Sequence)draggedNodeValue;
125 126
            if(fromParentSpecimen instanceof DnaSample){
126
                occurrenceService.moveSequence((DnaSample)fromParentSpecimen, (DnaSample)targetNodeValue, sequence);
127
                return true;
127
                return occurrenceService.moveSequence((DnaSample)fromParentSpecimen, (DnaSample)targetNodeValue, sequence);
128 128
            }
129 129
        }
130 130
        return false;

Also available in: Unified diff