commit 947bebd64a20ec4e6a36ae98cc41a41b9824c3d9
Author: Katja Luther <k.luther@bgbm.org>
Date:   Thu Oct 8 10:38:05 2015 +0200

    #5114 fix

diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
index 00d27bf12..d005de543 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/DeleteSynonymOperation.java
@@ -79,7 +79,7 @@ public class DeleteSynonymOperation extends AbstractPostTaxonOperation {
 					element.removeSynonym(synonym);
 
 				} else {
-
+//TODO: this should be moved to the handler, the operations should not contain ui code
 					DeleteResult result = service.deleteSynonym(synonym.getUuid(), element.getUuid(), null);
 					if (result.isError()){
 						DeleteResultMessagingUtils.messageDialogWithDetails(result, "Delete failed", TaxeditorEditorPlugin.PLUGIN_ID);
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DeleteResultMessagingUtils.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DeleteResultMessagingUtils.java
index 8e46d4806..2192e262e 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DeleteResultMessagingUtils.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DeleteResultMessagingUtils.java
@@ -67,7 +67,7 @@ public class DeleteResultMessagingUtils extends MessagingUtils {
             for (String relatedObject: relatedObjects){
 
                 relatedObjectsString.append(relatedObject);
-                relatedObjectsString.append("\n");
+                relatedObjectsString.append(System.lineSeparator());
             }
         }
         message = message + "\n" ;
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
index 31af3b5e3..937f8b502 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java
@@ -95,9 +95,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 		selection_parentTaxonNode = formFactory
 				.createTaxonNodeSelectionElement(getConversationHolder(), formElement, "Parent", null,
 						EntitySelectionElement.DELETABLE, style);
-		selection_SecRef = formFactory
-				.createSelectionElement(Reference.class,getConversationHolder(), formElement, "Secundum Reference", null,
-						EntitySelectionElement.DELETABLE, style);
+
 		selection_reuseExistingTaxon = formFactory
 				.createSelectionElement(Taxon.class,
 						getConversationHolder(), formElement,
@@ -109,7 +107,9 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 						getConversationHolder(), formElement,
 						"Reuse existing name", null,
 						EntitySelectionElement.DELETABLE, style);
-
+		selection_SecRef = formFactory
+                .createSelectionElement(Reference.class,getConversationHolder(), formElement, "Secundum Reference", null,
+                        EntitySelectionElement.DELETABLE, style);
 		textNewTaxonName = formFactory.createTextWithLabelElement(formElement,
 				"New Taxon", "", style);
 		textNewTaxonName.setFocus();
@@ -241,12 +241,14 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 			selection_classification.setEntity(classification);
 			selection_parentTaxonNode.setEntity(null);
 			selection_parentTaxonNode.setClassification(classification);
+			selection_SecRef.setEntity(classification.getReference());
 		} else if (parentTreeNode instanceof TaxonNode) {
 			classification = (Classification) HibernateProxyHelper
 					.deproxy(((TaxonNode) parentTreeNode).getClassification());
 			selection_classification.setEntity(classification);
 			selection_parentTaxonNode.setEntity((TaxonNode) parentTreeNode);
 			selection_parentTaxonNode.setClassification(classification);
+			selection_SecRef.setEntity(((TaxonNode)parentTreeNode).getTaxon().getSec());
 		} else if(parentTreeNode == null){
 			this.parentTreeNode = selection_classification.getEntity();
 		}
@@ -260,7 +262,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
 	private void setTaxon(Taxon taxon) {
 		this.taxon = taxon;
 		textNewTaxonName.setText(taxon.getName().getTitleCache());
-		this.secReference = taxon.getSec();
+		selection_SecRef.setEntity(taxon.getSec());
 	}
 
 	private void setTaxon(String taxonNameString) {
