Revision 8f3c6043
Added by Katja Luther almost 6 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateNewTaxonBaseOperation.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import org.eclipse.core.commands.operations.IUndoContext; |
14 | 14 |
|
15 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
|
16 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
15 | 17 |
import eu.etaxonomy.cdm.model.taxon.Synonym; |
16 | 18 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
17 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
|
18 | 19 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
19 | 20 |
import eu.etaxonomy.taxeditor.editor.name.e4.TaxonNameEditorE4; |
20 | 21 |
import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation; |
... | ... | |
51 | 52 |
/** |
52 | 53 |
* @param newTaxonBase |
53 | 54 |
*/ |
54 |
protected void addToSaveList(TaxonBase newTaxonBase) {
|
|
55 |
protected void addToSaveList(CdmBase newCdmBase) {
|
|
55 | 56 |
TaxonNameEditorE4 editor = null; |
56 | 57 |
Object activePart = EditorUtil.getActivePart(); |
57 | 58 |
if (activePart instanceof TaxonNameEditorE4){ |
58 | 59 |
editor = (TaxonNameEditorE4) activePart; |
59 |
if (newTaxonBase instanceof Synonym){ |
|
60 |
editor.getEditorInput().addToSaveNewSynonym((Synonym)newTaxonBase); |
|
61 |
}else{ |
|
62 |
editor.getEditorInput().addToSaveNewConcept((Taxon)newTaxonBase); |
|
60 |
if (newCdmBase instanceof Synonym){ |
|
61 |
editor.getEditorInput().addToSaveNewSynonym((Synonym)newCdmBase); |
|
62 |
}else if (newCdmBase instanceof Taxon ){ |
|
63 |
editor.getEditorInput().addToSaveNewConcept((Taxon)newCdmBase); |
|
64 |
}else if (newCdmBase instanceof TaxonName){ |
|
65 |
editor.getEditorInput().addToSaveNewName((TaxonName)newCdmBase); |
|
63 | 66 |
} |
64 | 67 |
editor.setDirty(); |
65 | 68 |
} |
Also available in: Unified diff
fix #7393: fix regression caused by removing cascading in relationships for new syn and concepts