Revision c87fb375
Added by Katja Luther almost 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptionElementDropAdapter.java | ||
---|---|---|
58 | 58 |
Collection<DescriptionElementBase> descriptionElements = new ArrayList<DescriptionElementBase>(); |
59 | 59 |
|
60 | 60 |
boolean isCopy = getCurrentOperation() == DND.DROP_COPY ? true : false; |
61 |
|
|
61 |
DescriptionBase<?> description = null; |
|
62 | 62 |
// cannot drop a feature node onto itself |
63 | 63 |
if (droppedElements != null){ |
64 | 64 |
for (Object droppedElement : droppedElements) { |
... | ... | |
74 | 74 |
if (descriptionElement.getInDescription().equals(target)) { |
75 | 75 |
return false; |
76 | 76 |
} |
77 |
DescriptionBase<?> description = descriptionElement.getInDescription();
|
|
77 |
description = descriptionElement.getInDescription(); |
|
78 | 78 |
description.removeElement(descriptionElement); |
79 | 79 |
target.addElement(descriptionElement); |
80 | 80 |
|
... | ... | |
87 | 87 |
TaxonNameEditorE4 editor = null; |
88 | 88 |
Object activePart = EditorUtil.getActivePart(); |
89 | 89 |
if (activePart instanceof FactualDataPartE4){ |
90 |
MPart selectionProvidingPart =(MPart) ((FactualDataPartE4)activePart).getSelectionProvidingPart();
|
|
90 |
MPart selectionProvidingPart =((FactualDataPartE4)activePart).getSelectionProvidingPart(); |
|
91 | 91 |
Object obj = selectionProvidingPart.getObject(); |
92 | 92 |
if (obj instanceof TaxonNameEditorE4){ |
93 | 93 |
editor = (TaxonNameEditorE4) obj; |
94 | 94 |
} |
95 | 95 |
} |
96 |
AbstractPostTaxonOperation operation = new MoveDescriptionElementsOperation(Messages.DescriptionElementDropAdapter_MOVE_DESC, EditorUtil.getUndoContext(), target, descriptionElements, isCopy, null, sync); |
|
96 |
AbstractPostTaxonOperation operation = new MoveDescriptionElementsOperation(Messages.DescriptionElementDropAdapter_MOVE_DESC, EditorUtil.getUndoContext(), target, description, descriptionElements, isCopy, null, sync);
|
|
97 | 97 |
|
98 | 98 |
editor.getEditorInput().addOperation(operation); |
99 | 99 |
editor.setDirty(); |
Also available in: Unified diff
adapt editor to proParte synonyms