Revision 78c76c38
Added by Patrick Plitzner over 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/featuretree/e4/FeatureTreeDropAdapter.java | ||
---|---|---|
58 | 58 |
return false; |
59 | 59 |
} |
60 | 60 |
Object currentTarget = getCurrentTarget(); |
61 |
TermNode<Feature> target = null;
|
|
61 |
TermNode target = null; |
|
62 | 62 |
if(currentTarget instanceof TermTree){ |
63 | 63 |
target = ((TermTree) currentTarget).getRoot(); |
64 | 64 |
} |
... | ... | |
69 | 69 |
|
70 | 70 |
if (target != null) { |
71 | 71 |
int location = getCurrentLocation(); |
72 |
TermNode<Feature> parent = target.getParent();
|
|
72 |
TermNode parent = target.getParent(); |
|
73 | 73 |
if(parent!=null){ |
74 | 74 |
if (location == LOCATION_BEFORE) { |
75 | 75 |
position = Math.max(0, parent.getIndex(target)); |
... | ... | |
126 | 126 |
} |
127 | 127 |
} |
128 | 128 |
if(droppedObject instanceof TermNode){ |
129 |
TermNode<Feature> droppedNode = (TermNode<Feature>) droppedObject;
|
|
129 |
TermNode droppedNode = (TermNode) droppedObject;
|
|
130 | 130 |
int currentPosition = target.getIndex(droppedNode); |
131 | 131 |
if(currentPosition<position){ |
132 | 132 |
position -= 1; |
Also available in: Unified diff
ref #8238 Remove too specific generics from TermTree and TermNode