Revision 49d3c2dd
Added by Katja Luther over 1 year ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/operation/MoveSynonymToAnotherAcceptedTaxonOperationE4.java | ||
---|---|---|
12 | 12 |
import org.eclipse.core.runtime.IProgressMonitor; |
13 | 13 |
import org.eclipse.core.runtime.IStatus; |
14 | 14 |
|
15 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
|
16 | 15 |
import eu.etaxonomy.cdm.api.service.ITaxonService; |
17 | 16 |
import eu.etaxonomy.cdm.api.service.UpdateResult; |
18 | 17 |
import eu.etaxonomy.cdm.api.service.exception.HomotypicalGroupChangeException; |
... | ... | |
30 | 29 |
* The synonym to be moved. |
31 | 30 |
*/ |
32 | 31 |
private final Synonym synonym; |
33 |
private IConversationEnabled conversationEnabled; |
|
34 | 32 |
private UUID newSecUuid; |
35 | 33 |
|
36 | 34 |
public MoveSynonymToAnotherAcceptedTaxonOperationE4(String label, IUndoContext undoContext, UUID synonymUUID, |
37 |
Taxon taxon, UUID newSecRefUuid, IPostOperationEnabled postOperationEnabled, IConversationEnabled conversationEnabled) {
|
|
35 |
Taxon taxon, UUID newSecRefUuid, IPostOperationEnabled postOperationEnabled) { |
|
38 | 36 |
|
39 | 37 |
super(label, undoContext, taxon, postOperationEnabled); |
40 | 38 |
List<String> propertyPaths = new ArrayList<String>(); |
41 | 39 |
propertyPaths.add("synonymRelations"); //$NON-NLS-1$ |
42 |
this.conversationEnabled = conversationEnabled; |
|
40 |
|
|
43 | 41 |
this.element = (Taxon) CdmStore.getService(ITaxonService.class).load(taxon.getUuid(),propertyPaths); |
44 | 42 |
this.synonym = (Synonym) CdmStore.getService(ITaxonService.class).load(synonymUUID); |
45 | 43 |
this.newSecUuid = newSecRefUuid; |
... | ... | |
59 | 57 |
monitor.beginTask("Move synonym to another taxon", 40); |
60 | 58 |
Taxon oldAccepted = synonym.getAcceptedTaxon(); |
61 | 59 |
// Reference secRef = CdmStore.getService(IReferenceService.class).load(newSecUuid); |
62 |
conversationEnabled.getConversationHolder().commit(); |
|
63 |
|
|
64 | 60 |
UpdateResult result = null; |
65 | 61 |
try { |
66 | 62 |
result = CdmStore.getService(ITaxonService.class).moveSynonymToAnotherTaxon(synonym, |
... | ... | |
74 | 70 |
// TODO Auto-generated catch block |
75 | 71 |
e.printStackTrace(); |
76 | 72 |
} |
77 |
// conversationEnabled.getConversationHolder().commit(); |
|
78 |
|
|
79 | 73 |
monitor.worked(40); |
80 | 74 |
// Redraw editor if it exists |
81 | 75 |
Set<Taxon> taxa = new HashSet<>(); |
... | ... | |
83 | 77 |
taxa.add(oldAccepted); |
84 | 78 |
|
85 | 79 |
EditorUtil.updateNameEditors(taxa); |
86 |
// ((TaxonNameEditorE4)EventUtility.getTaxonEditor()).getConversationHolder().commit(); |
|
87 |
|
|
88 | 80 |
|
89 | 81 |
return postExecute(null); |
90 | 82 |
} |
Also available in: Unified diff
ref #10186: remove conversation holder