commit 5ab46e8949ec4c99957aa07bde41f8fdefc39615
Author: Katja Luther <k.luther@bgbm.org>
Date:   Wed Dec 19 13:49:04 2018 +0100

    ref #7854: show label corresponding to preferences

diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/ChecklistEditorE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/ChecklistEditorE4.java
index a77eb9c81..211f752cf 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/ChecklistEditorE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/ChecklistEditorE4.java
@@ -473,7 +473,7 @@ public class ChecklistEditorE4 implements  IConversationEnabled,
                     Representation rep = term.getPreferredRepresentation(CdmStore.getDefaultLanguage());
                     String label = rep.getLabel();
                     if (label == null){
-                        term.getTitleCache();
+                        label = term.getTitleCache();
                     }
                     if (PreferencesUtil.isShowIdInVocabularyInChecklistEditor()){
                         if (term.getIdInVocabulary() != null){
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditor.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditor.java
index f2218f13c..22f589c14 100755
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditor.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/DistributionEditor.java
@@ -78,6 +78,7 @@ import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.Language;
 import eu.etaxonomy.cdm.model.common.OrderedTermBase;
 import eu.etaxonomy.cdm.model.common.OrderedTermComparator;
+import eu.etaxonomy.cdm.model.common.Representation;
 import eu.etaxonomy.cdm.model.common.TermIdInVocabularyComparator;
 import eu.etaxonomy.cdm.model.common.TermLanguageComparator;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
@@ -533,9 +534,37 @@ public class DistributionEditor extends Composite {
         loadNamedAreas();
         for (DefinedTermBase area: areas) {
             this.areaToColumnIndexMap.put(index++, (NamedArea)area);
-
+            String areaLabel;
             //TODO: adapt to preference
-            String areaLabel = area.getLabel();
+            Representation rep = area.getPreferredRepresentation(CdmStore.getDefaultLanguage());
+            String label = rep.getLabel();
+            if (label == null){
+                label = area.getTitleCache();
+            }
+            if (PreferencesUtil.isShowIdInVocabularyInChecklistEditor()){
+                if (area.getIdInVocabulary() != null){
+                    areaLabel = area.getIdInVocabulary();
+                } else{
+                    areaLabel = label;
+                }
+            }else if (PreferencesUtil.isShowSymbol1InChecklistEditor()){
+                if (area.getSymbol() != null){
+                    areaLabel = area.getSymbol();
+                } else{
+                    areaLabel = label;
+                }
+            }else if (PreferencesUtil.isShowSymbol2InChecklistEditor()){
+                if (area.getSymbol2() != null){
+                    areaLabel = area.getSymbol2();
+                } else{
+                    areaLabel = label;
+                }
+            }else{
+                areaLabel = label;
+            }
+
+
+            //String areaLabel = area.getLabel();
             String property = areaLabel;
             propertyToLabelMap.put(property, areaLabel);
         }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/StatusDisplayConverter.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/StatusDisplayConverter.java
index 7a9ab8507..1fe6140d9 100755
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/StatusDisplayConverter.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/checklist/e4/StatusDisplayConverter.java
@@ -8,10 +8,15 @@
 */
 package eu.etaxonomy.taxeditor.editor.view.checklist.e4;
 
+import org.apache.commons.lang.StringUtils;
 import org.eclipse.nebula.widgets.nattable.data.convert.DisplayConverter;
 
+import eu.etaxonomy.cdm.model.common.Representation;
 import eu.etaxonomy.cdm.model.description.Distribution;
 import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.preference.TermDisplayEnum;
+import eu.etaxonomy.taxeditor.store.CdmStore;
 
 /**
  * @author k.luther
@@ -19,7 +24,7 @@ import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm;
  *
  */
 public class StatusDisplayConverter extends DisplayConverter{
-
+    public static final String DEFAULT_ENTRY = "";
     /**
      * {@inheritDoc}
      */
@@ -28,7 +33,28 @@ public class StatusDisplayConverter extends DisplayConverter{
         if(canonicalValue instanceof Distribution){
             Distribution distribution = (Distribution)canonicalValue;
             if (distribution.getStatus() != null){
-                 return distribution.getStatus().getLabel();
+                PresenceAbsenceTerm term = distribution.getStatus();
+                Representation rep = distribution.getStatus().getPreferredRepresentation(CdmStore.getDefaultLanguage());
+                String label = rep.getLabel();
+
+                if (label == null){
+                    label = distribution.getStatus().getTitleCache();
+                }
+                if (PreferencesUtil.displayStatusInChecklistEditor() != null){
+                    if(PreferencesUtil.displayStatusInChecklistEditor().equals(TermDisplayEnum.IdInVocabulary.getKey())){
+                        return (StringUtils.isNotBlank(distribution.getStatus().getIdInVocabulary()))?distribution.getStatus().getIdInVocabulary():label;
+                    }else if(PreferencesUtil.displayStatusInChecklistEditor().equals(TermDisplayEnum.Symbol1.getKey())){
+
+                        return (StringUtils.isNotBlank(distribution.getStatus().getSymbol() ))?distribution.getStatus().getSymbol():label;
+                    }else if(PreferencesUtil.displayStatusInChecklistEditor().equals(TermDisplayEnum.Symbol2.getKey())){
+                        return (StringUtils.isNotBlank(distribution.getStatus().getSymbol2() ))?distribution.getStatus().getSymbol2():label;
+                    }else{
+                        return (label != null)?label:DEFAULT_ENTRY;
+                    }
+
+                }else{
+                    return (label != null)?label:DEFAULT_ENTRY;
+                }
             }
 
             return "";
