import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
+import eu.etaxonomy.cdm.model.taxon.Synonym;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.editor.group.authority.CdmAuthorityEditor;
throws PartInitException {
TaxonBase taxonBase = CdmStore.getService(ITaxonService.class).find(taxonBaseUuid);
if (taxonBase != null && taxonBase.isOrphaned()) {
- MessagingUtils.warningDialog("Orphaned Taxon", TaxonEditorInput.class, "This is an orphaned taxon i.e. a taxon that is not connected to a classification and not having any taxonomic relationships. Editing of orphaned taxa is currently not supported.");
+ if(taxonBase.isInstanceOf(Synonym.class)){
+ MessagingUtils.warningDialog("Orphaned accepted taxon", TaxonEditorInput.class, "The accepted "
+ + "taxon of this synonym is not part of any classification. Editing with the "
+ + "name editor is currently not implemented. Try to edit the taxon with the bulk editor.");
return;
+ }
+ else{
+ MessagingUtils.warningDialog("Orphaned Taxon", TaxonEditorInput.class, "This is an orphaned taxon "
+ + "i.e. a taxon that is not connected to a classification and not having any taxonomic "
+ + "relationships. Editing of orphaned taxa in the name editor currently not supported. "
+ + "Try editing with the bulk editor");
+ return;
+ }
}
TaxonEditorInput input = TaxonEditorInput
.NewInstanceFromTaxonBase(taxonBaseUuid);
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.");
}
}