X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/blobdiff_plain/1bf80c0c5daafa3cf40d34be966146731c669fb9..6b77cd39741ad5644cdb94995e0660ccf5bbde18:/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptRelationshipTypeOperation.java diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptRelationshipTypeOperation.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptRelationshipTypeOperation.java index 0b6fb5125..285b5b093 100644 --- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptRelationshipTypeOperation.java +++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeConceptRelationshipTypeOperation.java @@ -20,6 +20,9 @@ import org.eclipse.core.runtime.IStatus; import eu.etaxonomy.cdm.model.taxon.Taxon; import eu.etaxonomy.cdm.model.taxon.TaxonRelationship; import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType; +import eu.etaxonomy.taxeditor.editor.l10n.Messages; +import eu.etaxonomy.taxeditor.event.EventUtility; +import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants; import eu.etaxonomy.taxeditor.model.MessagingUtils; import eu.etaxonomy.taxeditor.operation.AbstractPostTaxonOperation; import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; @@ -59,8 +62,7 @@ public class ChangeConceptRelationshipTypeOperation extends AbstractPostTaxonOpe Set taxonRelationships = taxon.getTaxonRelations(relatedTaxon); if(taxonRelationships.size() > 1){ - MessagingUtils.warningDialog("Multiple relations between taxa", this, "There are multiple relations between the " + - "accepted and the related taxon. This case is not handled by the software yet"); + MessagingUtils.warningDialog(ChangeConceptToSynonymOperation.CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS, this, ChangeConceptToSynonymOperation.CHANGE_CONCEPT_TO_SYNONYM_OPERATION_MULTI_REPS_MESSAGE); return; } @@ -79,14 +81,15 @@ public class ChangeConceptRelationshipTypeOperation extends AbstractPostTaxonOpe // Remove relatedTaxon and old relationship // FIXME since taxon relationships come in a set, which relationships are we going to delete here? - element.removeTaxon(relatedTaxon, oldRelationshipType); + // element.removeTaxon(relatedTaxon, oldRelationshipType); monitor.worked(20); // Add new relationship // TODO add microcitation for misapplied name to property sheet - relatedTaxon.addTaxonRelation(element, newRelationshipType, null, null); + // relatedTaxon.addTaxonRelation(element, newRelationshipType, null, null); + this.taxonRelationship.setType(newRelationshipType); monitor.worked(40); - + EventUtility.postEvent(WorkbenchEventConstants.REFRESH_DETAILS, true); return postExecute(relatedTaxon); } @@ -108,7 +111,7 @@ public class ChangeConceptRelationshipTypeOperation extends AbstractPostTaxonOpe public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException { // see FIXME in execute() - MessagingUtils.warn(this.getClass(), "Not implemented yet. See developer documentation for details"); + MessagingUtils.warn(this.getClass(), Messages.ChangeConceptRelationshipTypeOperation_NOT_IMPLEMENTED); return null; } }