Project

General

Profile

« Previous | Next » 

Revision caffc76b

Added by Katja Luther over 4 years ago

ref #8801: disabled submenu items should be visible again

View differences:

eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/AggregateDistributionForSubTreeHandler.java
149 149
        boolean canExecute = false;
150 150
        canExecute = selection.size()==1
151 151
                && selection.getFirstElement() instanceof TaxonNodeDto;
152
        menuItem.setVisible(canExecute);
152
        menuItem.setEnabled(canExecute);
153 153
        return canExecute;
154 154
    }
155 155

  
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/DeleteHandlerE4.java
27 27

  
28 28
import eu.etaxonomy.cdm.api.service.config.NodeDeletionConfigurator.ChildHandling;
29 29
import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
30
import eu.etaxonomy.cdm.api.service.config.TaxonNodeDeletionConfigurator;
31 30
import eu.etaxonomy.cdm.model.taxon.Synonym;
32 31
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
33 32
import eu.etaxonomy.taxeditor.model.AbstractUtility;
......
82 81
			allEditorsClosed &= closeObsoleteEditor(treeNode);
83 82
		}
84 83
		AbstractPostOperation operation = null;
84

  
85

  
85 86
		TaxonDeletionConfigurator config = new TaxonDeletionConfigurator();
86 87
		config.setDeleteInAllClassifications(false);
87 88

  
......
90 91

  
91 92
			    TaxonNodeDto taxonNode = treeNodes.iterator().next();
92 93
//			    TaxonNodeDto taxonNode = treeNode;
93
				TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
94
//				TaxonNodeDeletionConfigurator configNodes = new TaxonNodeDeletionConfigurator();
94 95

  
95 96
				//configNodes.setDeleteTaxon(false);
96 97
                if (taxonNode.getTaxonUuid() == null && taxonNode.getTaxonomicChildrenCount()>0){
......
116 117

  
117 118
						if (dialog_result == 0){
118 119
							//delete all children
119
							configNodes.setChildHandling(ChildHandling.DELETE);
120
							config.setTaxonNodeConfig(configNodes);
120
							config.getTaxonNodeConfig().setChildHandling(ChildHandling.DELETE);
121

  
121 122
						} else if (dialog_result == 1){
122 123
							//move children
123
							configNodes.setChildHandling(ChildHandling.MOVE_TO_PARENT);
124
							config.setTaxonNodeConfig(configNodes);
124
						    config.getTaxonNodeConfig().setChildHandling(ChildHandling.MOVE_TO_PARENT);
125

  
125 126
						} else if (dialog_result == 2){
126 127
							//skip
127 128
							return;
128 129

  
129 130
						}
130
					}else{
131
						if(!DeleteConfiguratorDialog.openConfirmWithConfigurator(configNodes, shell, CONFIRM_DELETION, DO_YOU_REALLY_WANT_TO_DELETE_THE_SELECTED_NODE_S)){
132
							return;
133
						}
134
						config.setTaxonNodeConfig(configNodes);
135 131
					}
136 132
				}
137 133

  
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetPublishFlagForSubtreeHandlerE4.java
51 51
     * @param label
52 52
     */
53 53
    public SetPublishFlagForSubtreeHandlerE4() {
54
        //FIXME add missing l10n property
55
//        super(TaxonNavigatorLabels.CHANGE_PUBLISH_FOR_SUBTREE);
56
        super(""); //$NON-NLS-1$
54
       super(""); //$NON-NLS-1$
57 55
    }
58 56

  
59 57

  
......
130 128
        boolean canExecute = false;
131 129
        canExecute = selection.size()==1
132 130
                && selection.getFirstElement() instanceof TaxonNodeDto;
133
        menuItem.setVisible(canExecute);
131
        menuItem.setEnabled(canExecute);
134 132
        return canExecute;
135 133
    }
136 134

  
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/SetSecReferenceForSubtreeHandlerE4.java
124 124
        boolean canExecute = false;
125 125
        canExecute = selection.size()==1
126 126
                && selection.getFirstElement() instanceof TaxonNodeDto;
127
        menuItem.setVisible(canExecute);
127
        menuItem.setEnabled(canExecute);
128 128
        return canExecute;
129 129
    }
130 130

  

Also available in: Unified diff