From b30beda380d3ea4af4fe54c592f6d633b2d0af2f Mon Sep 17 00:00:00 2001 From: Katja Luther Date: Thu, 20 Oct 2016 15:00:32 +0200 Subject: [PATCH] minor changes for name details view configuration --- .../taxeditor/view/detail/DetailsViewer.java | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java index 48e089902..420fcbef8 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java @@ -382,35 +382,33 @@ public class DetailsViewer extends AbstractCdmDataViewer { .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.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); } - 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); } - 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); -- 2.34.1