smaller changes for pro parte syn and MA in name editor
authorKatja Luther <k.luther@bgbm.org>
Thu, 17 May 2018 08:00:03 +0000 (10:00 +0200)
committerKatja Luther <k.luther@bgbm.org>
Thu, 17 May 2018 08:00:03 +0000 (10:00 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/ConceptContainerE4.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonRelationshipDetailElement.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/AbstractCdmEditorPartE4.java

index dfbaa30e1cc7fa473f634eaa36ffaf72b0947986..981e0893052b7c0f7a76fc5f9c52a574fe87b64a 100644 (file)
@@ -80,8 +80,6 @@ public class ConceptContainerE4 extends AbstractGroupedContainerE4<Taxon> {
                TaxonName conceptName = HibernateProxyHelper.deproxy(getMisappliedName().getName());
                if (isMisapplication && StringUtils.isNotBlank(conceptName.getAuthorshipCache())){
                        author = ", non " + conceptName.getAuthorshipCache();
-               }else if (!isMisapplication && StringUtils.isNotBlank(conceptName.getAuthorshipCache())){
-                   author = conceptName.getAuthorshipCache();
                }
                if ((isMisapplication &&getMisappliedName().getSec() == null) || (!isMisapplication && relationship.getCitation() == null)) {
                    if (getMisappliedName().getAppendedPhrase() != null ){
@@ -96,7 +94,7 @@ public class ConceptContainerE4 extends AbstractGroupedContainerE4<Taxon> {
                    if (isMisapplication){
                        sec = " sensu ";
                    }else{
-                       sec = " syn sec ";
+                       sec = " syn. sec. ";
                    }
                        if (getMisappliedName().getAppendedPhrase() != null ){
                            sec = getMisappliedName().getAppendedPhrase() + " " + sec;
@@ -154,8 +152,12 @@ public class ConceptContainerE4 extends AbstractGroupedContainerE4<Taxon> {
                updateIndent();
 
                updateIcon();
-
-               String text = NameHelper.getDisplayNameCache(getData());
+               String text;
+               if (isMisapplication){
+                   text = NameHelper.getDisplayNameCache(getData());
+               }else{
+                   text = NameHelper.getDisplayName(getData());
+               }
 
                if (text.length() == 0) {
                        initEmptyText();
@@ -170,7 +172,13 @@ public class ConceptContainerE4 extends AbstractGroupedContainerE4<Taxon> {
     public void refresh() {
                // showNameRelations();
 
-               String text = NameHelper.getDisplayNameCache(getData());
+               String text;
+               if (isMisapplication){
+            text = NameHelper.getDisplayNameCache(getData());
+        }else{
+            text = NameHelper.getDisplayName(getData());
+        }
+
 
                if (getNameViewer().getTextWidget() == null) {
                        // we might get here via dnd. Look slike it can be ignored
index b30dcbb1b21baf28da55647c46b3f8ff1670a942..e5bdfa8029971b599ab7a7dc3cb3ed892a624da4 100644 (file)
@@ -110,18 +110,10 @@ public class TaxonRelationshipDetailElement extends AbstractCdmDetailElement<Tax
             addElement(taxonElement);
 
 
-            sensuReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(),
-                 formElement, "Sec",
-                taxon.getSec(), EntitySelectionElement.ALL,
-                style);
 
-            text_sensu_microreference = formFactory.createTextWithLabelElement(
-                    formElement, "Detail",
-                    taxon.getSecMicroReference(),null,
-                    SWT.WRAP);
 
             secReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(),
-                    formElement, "Syn Sec.",
+                    formElement, "Syn. Sec.",
                     entity.getCitation(), EntitySelectionElement.ALL,
                     style);
 
@@ -129,6 +121,15 @@ public class TaxonRelationshipDetailElement extends AbstractCdmDetailElement<Tax
                     formElement, "Detail",
                     entity.getCitationMicroReference(),null,
                     SWT.WRAP);
+            sensuReference = formFactory.createSelectionElement(Reference.class,//getConversationHolder(),
+                    formElement, "Sec",
+                   taxon.getSec(), EntitySelectionElement.ALL,
+                   style);
+
+               text_sensu_microreference = formFactory.createTextWithLabelElement(
+                       formElement, "Detail",
+                       taxon.getSecMicroReference(),null,
+                       SWT.WRAP);
 
             combo_misappliedRelationshipType = formFactory.createMisappliedRelationshipComboElement(formElement, "Synonym Type",
                     entity.getType(), style);
index 93a74a019f27ae168b2b6a3b139a0e541056a0b8..a44691fcab0813f04a386986dfb5eb099d9ea988 100644 (file)
@@ -201,7 +201,7 @@ public abstract class AbstractCdmEditorPartE4
                                 TaxonRelationship rel = rels.iterator().next();
                                 if ((rel.getType().isAnyMisappliedName() || rel.getType().isAnySynonym())&& !rel.getFromTaxon().equals(((ITaxonEditor) part).getTaxon())){
                                     viewer.setInput(rel);
-
+                                    selectionProvidingPart = activePart;
                                     return;
                                 }
                             }