Project

General

Profile

« Previous | Next » 

Revision e00acade

Added by Katja Luther about 5 years ago

use same saving strategie for local name details pref as for db name details pref

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java
64 64
import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
65 65
import eu.etaxonomy.taxeditor.model.MessagingUtils;
66 66
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
67
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
67
import eu.etaxonomy.taxeditor.preference.NameDetailsConfigurator;
68 68
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
69 69
import eu.etaxonomy.taxeditor.store.UsageTermCollection;
70 70
import eu.etaxonomy.taxeditor.ui.element.RootElement;
......
423 423
    }
424 424

  
425 425
    private void createTaxonSections(RootElement parent) {
426
        NameDetailsConfigurator config = PreferencesUtil.getPreferredNameDetailsConfiguration(true);
426 427
        ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
427 428
                getSectionStyle(ParsingMessagesSection.class, true));
428
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
429
        if (!config.isSimpleDetailsViewActivated()){
429 430
            TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
430 431
                    getSectionStyle(TaxonBaseDetailSection.class, true));
431 432
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
432 433
            addPart(taxonBaseDetailSection);
433 434
        }else{
434
            if (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
435
            if (config.isTaxonSectionActivated()){
435 436
                TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
436 437
                        getSectionStyle(TaxonBaseDetailSection.class, true));
437 438
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
442 443
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
443 444
                        getSectionStyle(NonViralNameDetailSection.class, true));
444 445
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
445
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
446
        if (!config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isNomenclaturalReferenceSectionActivated())){
446 447
            NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
447 448
                    getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
448 449
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
449 450
            addPart(referenceDetailSection);
450 451

  
451 452
        }
452
        if ( !PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
453
        if ( !config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isNomenclaturalStatusSectionActivated())){
453 454
            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
454 455
                    getSectionStyle(NomenclaturalStatusSection.class, true));
455 456
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
456 457
            addPart(nomenclaturalStatusSection);
457 458
        }
458 459

  
459
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
460
        if ( !config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isProtologueActivated())){
460 461
            ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, getSectionStyle(ProtologueSection.class));
461 462
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
462 463
            addPart(protologSection);
463 464
        }
464 465

  
465
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) &&  PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
466
        if (!config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isTypeDesignationSectionActivated())){
466 467
            TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, getSectionStyle(TypeDesignationSection.class));
467 468
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
468 469
            addPart(typeDesignationSection);
469 470
        }
470 471

  
471
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
472
        if (!config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() &&config.isNameRelationsSectionActivated())){
472 473
            NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, getSectionStyle(NameRelationshipDetailSection.class));
473 474
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
474 475
            addPart(nameRelationshipSection);
......
877 878
        if(refresh){
878 879
            refresh();
879 880

  
880
//            setSelection(getSelection(), true);
881 881
        }
882 882
    }
883 883

  

Also available in: Unified diff