Project

General

Profile

« Previous | Next » 

Revision 91a8d98c

Added by Cherian Mathew almost 9 years ago

#5009 Add operations and corresponding tests for delete / update nodes actions

#5009 : missed in last commit

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/RemotingPolytomousKeyDeleteHandler.java
10 10
package eu.etaxonomy.taxeditor.navigation.key.polytomous.handler;
11 11

  
12 12
import java.util.List;
13
import java.util.UUID;
13 14

  
14 15
import org.eclipse.core.commands.ExecutionEvent;
15 16
import org.eclipse.core.commands.operations.AbstractOperation;
......
18 19
import org.eclipse.jface.viewers.IStructuredSelection;
19 20
import org.eclipse.ui.handlers.HandlerUtil;
20 21

  
21
import eu.etaxonomy.cdm.model.description.PolytomousKey;
22 22
import eu.etaxonomy.taxeditor.model.MessagingUtils;
23 23
import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewLabels;
24 24
import eu.etaxonomy.taxeditor.navigation.key.polytomous.operation.RemotingPolytomousKeyDeleteOperation;
25 25
import eu.etaxonomy.taxeditor.operation.RemotingCdmHandler;
26
import eu.etaxonomy.taxeditor.util.OperationsUtil;
26 27

  
27 28
/**
28 29
 * @author cmathew
......
31 32
 */
32 33
public class RemotingPolytomousKeyDeleteHandler extends RemotingCdmHandler {
33 34

  
34
    List<PolytomousKey> keysToDelete;
35
    List<UUID> keysToDelete;
35 36
    /**
36 37
     * @param label
37 38
     */
......
46 47
    public IStatus allowOperations(ExecutionEvent event) {
47 48
        IStructuredSelection selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event);
48 49

  
49
        keysToDelete = selection.toList();
50
        keysToDelete = OperationsUtil.convertToUuidList(selection.toList());
50 51

  
51 52
        if(keysToDelete.isEmpty()){
52 53
           return Status.CANCEL_STATUS;

Also available in: Unified diff