Project

General

Profile

« Previous | Next » 

Revision 0ac7eec9

Added by Katja Luther almost 6 years ago

ref #7463: preselect of the classification by the classification of the first selected node

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/TreeNodeDropAdapterE4.java
220 220

  
221 221
		taxonNodes.forEach(nodeDto->EditorUtil.closeObsoleteEditor(nodeDto, partService));
222 222

  
223
//		TaxonNodeDto unsavedNode = taxonNodes.stream().filter(nodeDto ->
224
//		    !EditorUtil.closeObsoleteEditor(nodeDto, partService)).findAny().orElse(null);
225
//		if (unsavedNode != null){
226
//		    return false;
227
//		}
228 223
		moveNodes(uuids, targetITaxonTreeNode.getUuid(), movingTypeInt);
229 224
        return true;
230 225
	}
......
233 228
	    UUID uuid = CdmApplicationState.getLongRunningTasksService().monitLongRunningTask(taxonNodesToMoveUuid,
234 229
                newParentTreeNodeUuid, movingTypeInt);
235 230

  
236
                Display.getDefault().asyncExec(new Runnable() {
237
                    @Override
238
                    public void run() {
239
                        AbstractUtility.executeMoniteredOperation("Move Taxon to new parent: ",
240
                                uuid,
241
                                500,
242
                                false,
243
                                TreeNodeDropAdapterE4.this,
244
                                null);
245
                    }
246
                });
231
        Display.getDefault().asyncExec(new Runnable() {
232
            @Override
233
            public void run() {
234
                AbstractUtility.executeMoniteredOperation("Move Taxon to new parent: ",
235
                        uuid,
236
                        500,
237
                        false,
238
                        TreeNodeDropAdapterE4.this,
239
                        null);
240
            }
241
        });
247 242
	}
248 243

  
249 244

  
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/RemotingMoveTaxonNodeHandlerE4.java
48 48

  
49 49
    private Set<UUID> oldTaxonNodeUUIDs = new HashSet<>();
50 50
    private TaxonNavigatorE4 navigator;
51
    private UUID classificationUuid = null;
51 52

  
52 53
    public RemotingMoveTaxonNodeHandlerE4() {
53 54
        super(TaxonNavigatorLabels.MOVE_TAXON_LABEL);
......
72 73
            obj = iter.next();
73 74
            if(obj instanceof TaxonNodeDto) {
74 75
                oldTaxonNodeUUIDs.add(((TaxonNodeDto)obj).getUuid());
76
                if (classificationUuid == null){
77
                    classificationUuid = ((TaxonNodeDto)obj).getClassificationUUID();
78
                }
75 79
            } else {
76 80
                return new Status(IStatus.ERROR,
77 81
                        "unknown", //$NON-NLS-1$
......
96 100
                    Messages.RemotingMoveTaxonNodeHandler_CHOOSE_TAXON,
97 101
                    oldTaxonNodeUUIDs,
98 102
                    null,
99
                    null, true);
103
                    classificationUuid, true);
100 104
            String[] buttonLables = {Messages.RemotingMoveTaxonNodeHandler_CHILD, Messages.RemotingMoveTaxonNodeHandler_BEHIND,Messages.RemotingMoveTaxonNodeHandler_CANCEL};
101 105
            MessageDialog dialog = new MessageDialog(null, Messages.RemotingMoveTaxonNodeHandler_TARGET_NODE, null, Messages.RemotingMoveTaxonNodeHandler_TARGET_NODE_MESSAGE, MessageDialog.QUESTION_WITH_CANCEL, buttonLables, 0);
102 106
            dialog.open();
......
111 115
                    Messages.RemotingMoveTaxonNodeHandler_CHOOSE_PARENT,
112 116
                    oldTaxonNodeUUIDs,
113 117
                    null,
114
                    null, true);
118
                    classificationUuid, true);
115 119
        }
116 120

  
117 121

  
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/operation/RemotingMoveTaxonOperation.java
91 91
                    public void run() {
92 92
                        AbstractUtility.executeMoniteredOperation("Move Taxon to new parent: ",
93 93
                                uuid,
94
                                1000,
94
                                500,
95 95
                                false,
96 96
                                RemotingMoveTaxonOperation.this,
97 97
                                null);

Also available in: Unified diff