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/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

  

Also available in: Unified diff