}else if(taxonBase instanceof Synonym){
Synonym synonym = (Synonym) taxonBase;
- Set<Taxon> taxa = synonym.getAcceptedTaxa();
+ Set<Taxon> taxa = new HashSet<>();
+ Taxon taxon = synonym.getAcceptedTaxon();
+ if (taxon != null){
+ taxa.add(taxon);
+ }
setInputForMultipleTaxa(conversation, taxa);
}
}
if(taxonNode != null){
init(taxonNode);
}
- }else if(taxonNodes.size() == 0){
+ } else if (taxonNodes.size() == 0) {
// this is an undesired state
- MessagingUtils.warningDialog("Incorrect state", TaxonEditorInput.class, "The accepted taxon is not part of any classification. This should not have happened.");
+ MessagingUtils.warningDialog("Incorrect state",TaxonEditorInput.class,"The accepted "
+ + "taxon is not part of any classification. Editing with the "
+ + "name editor is currently not implemented. Try to edit the taxon with the bulk editor.");
}
}
public boolean equals(Object obj) {
if (TaxonEditorInput.class.equals(obj.getClass())
&& getTaxon() != null
- && getTaxon().equals(((TaxonEditorInput) obj).getTaxon())){
- if(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase() != null){
+ && getTaxon().equals(((TaxonEditorInput) obj).getTaxon())) {
+ if (((TaxonEditorInput) obj).getInitiallySelectedTaxonBase() != null){
setInitiallySelectedTaxonBase(((TaxonEditorInput) obj).getInitiallySelectedTaxonBase());
}
return true;
*/
@Override
public void merge() {
- CdmStore.getService(ITaxonNodeService.class).merge(taxonNode);
+ CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
+
}
@Override