Project

General

Profile

« Previous | Next » 

Revision 130bd395

Added by Katja Luther over 3 years ago

ref #9173: code cleaning

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/dnd/NameEditorDropTargetListenerE4.java
80 80
		} else {
81 81
			AbstractUtility.executeOperation(operation, target.getContext().get(UISynchronize.class));
82 82
		}
83
//		target.getEditor().getConversationHolder().commit();
84

  
85
//		if (!target.getEditor().equals(EventUtility.getTaxonEditor())){
86
//		    EditorUtil.updateEditor(target.getEditor().getTaxonNode(), target.getEditor());
87
//		    if (taxonBase instanceof Synonym){
88
//		        Synonym syn = (Synonym)taxonBase;
89
//		        EditorUtil.updateEditor(((Synonym) taxonBase).getAcceptedTaxon());
90
//		    }
91
//		   // ((TaxonNameEditorE4)EventUtility.getTaxonEditor()).redraw();
92
//			((TaxonNameEditorE4)EventUtility.getTaxonEditor()).getConversationHolder().commit();
93
//
94
//		}
95
//		target.getEditor().redraw();
96

  
97
//		target.getEditor().getContainer(taxonBase).setFocus();
98 83

  
99 84
	}
100 85

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeHomotypicGroupOperation.java
86 86
		newHomotypicalGroup.addTypifiedName(synonymName);
87 87

  
88 88
		Taxon acc = synonym.getAcceptedTaxon();
89
//		if(acc == null || !acc.equals(element)){
90
			if(acc != null){
91
				acc.removeSynonym(synonym);
92
			}
93

  
94
			SynonymType type = SynonymType.HETEROTYPIC_SYNONYM_OF();
95
			if(newHomotypicalGroup.getTypifiedNames().contains(element.getName())){
96
				type = SynonymType.HOMOTYPIC_SYNONYM_OF();
97
			}
98

  
99
			element.addSynonym(synonym, type);
100
//		}
89

  
90
		if(acc != null){
91
			acc.removeSynonym(synonym);
92
		}
93

  
94
		SynonymType type = SynonymType.HETEROTYPIC_SYNONYM_OF();
95
		if(newHomotypicalGroup.getTypifiedNames().contains(element.getName())){
96
			type = SynonymType.HOMOTYPIC_SYNONYM_OF();
97
		}
98

  
99
		element.addSynonym(synonym, type);
101 100

  
102 101
		// Redraw editor if it exists
103 102
		return postExecute(synonym);
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/TreeNodeDropAdapterE4.java
169 169
			    for (TaxonNode node: nodes){
170 170
			        hasPermission = hasPermission && CdmStore.currentAuthentiationHasPermission(node, UPDATE) && CdmStore.currentAuthentiationHasPermission(node.getTaxon(), UPDATE);
171 171
			    }
172
//				boolean hasTaxonPermission =
173
//	        			CdmStore.currentAuthentiationHasPermission(node.getTaxon(), UPDATE);
172

  
174 173
                if (
175 174
			        !isNotSameTaxonNode
176 175
			        || !isNotSameParent
......
185 184
			}
186 185
			logger.debug("OK_STATUS"); //$NON-NLS-1$
187 186
			return true;
188
//		}
189
//		logger.debug("CANCEL_STATUS"); //$NON-NLS-1$
190
//		return false;
187

  
191 188
	}
192 189

  
193 190

  
......
227 224

  
228 225

  
229 226
		}
230
		//close possible open name editors for the moved taxon nodes
231

  
232
//		taxonNodes.forEach(nodeDto->EditorUtil.closeObsoleteEditor(nodeDto, partService));
233

  
234 227
		moveNodes(uuids, targetITaxonTreeNode.getUuid(), movingTypeInt);
235 228
        return true;
236 229
	}

Also available in: Unified diff