minor changes for name details view configuration
authorKatja Luther <k.luther@bgbm.org>
Thu, 20 Oct 2016 13:00:32 +0000 (15:00 +0200)
committerKatja Luther <k.luther@bgbm.org>
Thu, 20 Oct 2016 13:00:32 +0000 (15:00 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java

index 48e0899021f0a6ba30c69c8ad7b9e6e5cc139f2c..420fcbef815e4eb38a8edb75bf6c0b65251c1b57 100644 (file)
@@ -382,35 +382,33 @@ public class DetailsViewer extends AbstractCdmDataViewer {
                 .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
                         ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                 .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
                         ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-        if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE)){
-            NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
-                       ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-            addPart(referenceDetailSection);
+        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){       
+                   NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
+                               ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+                   formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+                   addPart(referenceDetailSection);
+               
         }
         }
-        if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS)){
-            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
-                       ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-            addPart(nomenclaturalStatusSection);
-            
+        if ( !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
+                   NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
+                               ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+                   formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+                   addPart(nomenclaturalStatusSection);
         }
         }
-        //TODO RL
         if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)  ){
         if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)  ){
-               if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE)){
+               if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
                        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
                        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                        addPart(protologSection);
                }
                
                        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
                        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                        addPart(protologSection);
                }
                
-               if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION)){
+               if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) &&  PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
                        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
                        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                        addPart(typeDesignationSection);
                }
                
                        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
                        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                        addPart(typeDesignationSection);
                }
                
-               if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP)){
+               if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
                        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
                        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                        addPart(nameRelationshipSection);
                        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
                        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
                        addPart(nameRelationshipSection);