Project

General

Profile

« Previous | Next » 

Revision 5a76a91c

Added by Cherian Mathew over 8 years ago

Update handlers to use uuids inarguments

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeSynonymToAcceptedTaxonHandler.java
38 38
import eu.etaxonomy.taxeditor.model.MessagingUtils;
39 39
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
40 40
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
41
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
41 42
import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
42 43

  
43 44
/**
......
98 99
			Set<TaxonNameBase> namesInGroup = group.getTypifiedNames();
99 100
			// FIXME with this implementation we can not create a taxonNode that is a direct child of the classification node
100 101
			AbstractPostOperation operation = new ChangeSynonymToAcceptedTaxonOperation("Change synonym to accepted taxon", EditorUtil.getUndoContext(),
101
					taxon, newParentNode, synonym, namesInGroup, this, editor, editor); //$NON-NLS-1$
102
					taxon, newParentNode, synonym, namesInGroup, this, editor, (ICdmEntitySessionEnabled)editor.getEditorInput()); //$NON-NLS-1$
102 103
			EditorUtil.executeOperation(operation);
103 104
		}
104 105

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/DeleteTaxonBaseHandler.java
32 32
import eu.etaxonomy.taxeditor.model.MessagingUtils;
33 33
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
34 34
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
35
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
35 36

  
36 37
/**
37 38
 * <p>DeleteTaxonBaseHandler class.</p>
......
99 100
			        activePage,
100 101
			        this,
101 102
			        editor,
102
			        editor);
103
			        (ICdmEntitySessionEnabled)editor.getEditorInput());
103 104
			//editor.dispose();
104 105

  
105 106
		}
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/SwapSynonymAndAcceptedHandler.java
28 28
import eu.etaxonomy.taxeditor.editor.name.operation.SwapSynonymAndAcceptedOperation;
29 29
import eu.etaxonomy.taxeditor.model.MessagingUtils;
30 30
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
31
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
31 32

  
32 33
/**
33 34
 * <p>SwapSynonymAndAcceptedHandler class.</p>
......
60 61
		}
61 62

  
62 63
		try {
63
			SwapSynonymAndAcceptedOperation operation = new SwapSynonymAndAcceptedOperation(event.getCommand().getName(), editor.getUndoContext(),
64
								editor.getTaxon(), synonym, this, editor);
64
			SwapSynonymAndAcceptedOperation operation = new SwapSynonymAndAcceptedOperation(event.getCommand().getName(),
65
			        editor.getUndoContext(),
66
			        editor.getTaxon(),
67
			        synonym,
68
			        this,
69
			        (ICdmEntitySessionEnabled)editor.getEditorInput());
65 70

  
66 71
			EditorUtil.executeOperation(operation);
67 72

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionToOtherTaxonHandler.java
30 30
import eu.etaxonomy.taxeditor.model.AbstractUtility;
31 31
import eu.etaxonomy.taxeditor.model.MessagingUtils;
32 32
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
33
import eu.etaxonomy.taxeditor.session.ICdmEntitySessionEnabled;
33 34
import eu.etaxonomy.taxeditor.store.CdmStore;
34 35
import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonNodeSelectionDialog;
35 36

  
......
100 101
											newAcceptedTaxonNode,
101 102
											this,
102 103
											editor,
103
											editor);
104
											(ICdmEntitySessionEnabled)editor.getEditorInput());
104 105
					AbstractUtility.executeOperation(operation);
105 106
				}
106 107

  
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/operation/DeleteTaxonDescriptionOperation.java
9 9

  
10 10
package eu.etaxonomy.taxeditor.editor.view.descriptive.operation;
11 11

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

  
15 12
import org.eclipse.core.commands.ExecutionException;
16 13
import org.eclipse.core.commands.operations.IUndoContext;
17 14
import org.eclipse.core.runtime.IAdaptable;
......
66 63

  
67 64
		monitor.worked(20);
68 65
		if (description != null){
69
			List<String> propertyPaths = new ArrayList<String>();
70
			propertyPaths.add("taxon");
71
			TaxonDescription loadedDescription = (TaxonDescription) CdmStore.getService(IDescriptionService.class).load(description.getUuid(), propertyPaths);
72
			CdmStore.getService(IDescriptionService.class).deleteDescription(loadedDescription);
66
		    CdmStore.getService(IDescriptionService.class).deleteDescription(description.getUuid());
73 67
			return postExecute(description);
74 68
		}
75 69
		return null;

Also available in: Unified diff