Project

General

Profile

« Previous | Next » 

Revision 8ef15f41

Added by Katja Luther almost 7 years ago

last changes for #5325

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeSynonymToAcceptedTaxonHandler.java
10 10

  
11 11
package eu.etaxonomy.taxeditor.editor.name.handler;
12 12

  
13
import java.util.ArrayList;
13 14
import java.util.List;
14 15
import java.util.Set;
15 16
import java.util.UUID;
......
87 88

  
88 89
		TaxonNode parentNode = (TaxonNode) HibernateProxyHelper.deproxy(((TaxonEditorInput) input).getTaxonNode().getParent());
89 90

  
90
		List<UUID> excludeTaxa = null;
91
		List<UUID> excludeTaxa = new ArrayList<UUID>();
92
		excludeTaxa.add(taxon.getUuid());
91 93

  
92 94
		TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select parent", excludeTaxa, null, ((TaxonEditorInput) input).getTaxonNode().getClassification());
93 95

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/MoveSynonymToAnotherAcceptedTaxonHandler.java
9 9
import org.eclipse.ui.IEditorInput;
10 10
import org.eclipse.ui.handlers.HandlerUtil;
11 11

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

  
12 16
import eu.etaxonomy.cdm.model.common.CdmBase;
13 17
import eu.etaxonomy.cdm.model.taxon.Synonym;
14 18
import eu.etaxonomy.cdm.model.taxon.Taxon;
......
48 52
		}
49 53

  
50 54
		Synonym synonym = (Synonym) selection.getFirstElement();
55
		Taxon oldParent = ((TaxonEditorInput)input).getTaxon();
56
		List<UUID> excludeTaxa = new ArrayList<UUID>();
57
		excludeTaxa.add(oldParent.getUuid());
58
				
51 59
		TaxonNode newParentNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event), editor.getConversationHolder(), "Select new accepted taxon", null, null, ((TaxonEditorInput)input).getTaxonNode().getClassification());
52 60
		if(newParentNode!=null){
53
		    Taxon oldParent = ((TaxonEditorInput)input).getTaxon();
54

  
55
		    MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(),
61
		   MoveSynonymToAnotherAcceptedTaxonOperation operation = new MoveSynonymToAnotherAcceptedTaxonOperation("Change accepted Taxon of Synonym", EditorUtil.getUndoContext(),
56 62
		            oldParent.getUuid(), synonym.getUuid(), newParentNode.getTaxon(), editor);
57 63

  
58 64
		    AbstractUtility.executeOperation(operation);
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientClassificationService.java
975 975
        return defaultService.loadWithUpdate(arg0);
976 976
    }
977 977

  
978
	@Override
979
	public List<UuidAndTitleCache<TaxonNode>> getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(
980
			UUID classificationUuid, List<UUID> excludeTaxa) {
981
		
982
		return defaultService.getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(classificationUuid, excludeTaxa);
983
	}
984

  
978 985

  
979 986
}
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/ChangeAcceptedTaxonToSynonymHandler.java
108 108
				}*/
109 109

  
110 110
				List<UUID> excludeTaxa = new ArrayList<UUID>();
111
				excludeTaxa.add(oldAcceptedTaxonNode.getUuid());
111
				excludeTaxa.add(((TaxonNode)oldAcceptedTaxonNode).getTaxon().getUuid());
112 112
				TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
113 113
						taxonNavigator.getConversationHolder(),
114 114
						"Choose the accepted taxon",
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingChangeAcceptedTaxonToSynonymHandler.java
97 97
    @Override
98 98
    public AbstractOperation prepareOperation(ExecutionEvent event) {
99 99
        List<UUID> excludeTaxa = new ArrayList<UUID>();
100
        excludeTaxa.add(oldTaxonNode.getUuid());
100
        excludeTaxa.add(((TaxonNode)oldTaxonNode).getTaxon().getUuid());
101 101
        TaxonNode newAcceptedTaxonNode = TaxonNodeSelectionDialog.select(HandlerUtil.getActiveShell(event),
102 102
                new ConversationHolderMock(),
103 103
                "Choose the accepted taxon",
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/RemotingMoveTaxonNodeHandler.java
85 85
        TaxonNode parentTaxonNode;
86 86

  
87 87
        List<UUID> excludeTaxa = new ArrayList<UUID>();
88
        excludeTaxa.add(oldTaxonNode.getUuid());
88
        excludeTaxa.add(((TaxonNode)oldTaxonNode).getTaxon().getUuid());
89 89

  
90 90
        boolean moveToNewParent = true;
91 91

  

Also available in: Unified diff