taxonNodes.forEach(nodeDto->EditorUtil.closeObsoleteEditor(nodeDto, partService));
-// TaxonNodeDto unsavedNode = taxonNodes.stream().filter(nodeDto ->
-// !EditorUtil.closeObsoleteEditor(nodeDto, partService)).findAny().orElse(null);
-// if (unsavedNode != null){
-// return false;
-// }
moveNodes(uuids, targetITaxonTreeNode.getUuid(), movingTypeInt);
return true;
}
UUID uuid = CdmApplicationState.getLongRunningTasksService().monitLongRunningTask(taxonNodesToMoveUuid,
newParentTreeNodeUuid, movingTypeInt);
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- AbstractUtility.executeMoniteredOperation("Move Taxon to new parent: ",
- uuid,
- 500,
- false,
- TreeNodeDropAdapterE4.this,
- null);
- }
- });
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ AbstractUtility.executeMoniteredOperation("Move Taxon to new parent: ",
+ uuid,
+ 500,
+ false,
+ TreeNodeDropAdapterE4.this,
+ null);
+ }
+ });
}
private Set<UUID> oldTaxonNodeUUIDs = new HashSet<>();
private TaxonNavigatorE4 navigator;
+ private UUID classificationUuid = null;
public RemotingMoveTaxonNodeHandlerE4() {
super(TaxonNavigatorLabels.MOVE_TAXON_LABEL);
obj = iter.next();
if(obj instanceof TaxonNodeDto) {
oldTaxonNodeUUIDs.add(((TaxonNodeDto)obj).getUuid());
+ if (classificationUuid == null){
+ classificationUuid = ((TaxonNodeDto)obj).getClassificationUUID();
+ }
} else {
return new Status(IStatus.ERROR,
"unknown", //$NON-NLS-1$
Messages.RemotingMoveTaxonNodeHandler_CHOOSE_TAXON,
oldTaxonNodeUUIDs,
null,
- null, true);
+ classificationUuid, true);
String[] buttonLables = {Messages.RemotingMoveTaxonNodeHandler_CHILD, Messages.RemotingMoveTaxonNodeHandler_BEHIND,Messages.RemotingMoveTaxonNodeHandler_CANCEL};
MessageDialog dialog = new MessageDialog(null, Messages.RemotingMoveTaxonNodeHandler_TARGET_NODE, null, Messages.RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
dialog.open();
Messages.RemotingMoveTaxonNodeHandler_CHOOSE_PARENT,
oldTaxonNodeUUIDs,
null,
- null, true);
+ classificationUuid, true);
}