Project

General

Profile

« Previous | Next » 

Revision 98db3bf7

Added by Patrick Plitzner almost 5 years ago

ref #8260 Complete refactoring of expansion state saving

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java
67 67
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
68 68
import eu.etaxonomy.taxeditor.preference.NameDetailsConfigurator;
69 69
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
70
import eu.etaxonomy.taxeditor.store.StoreUtil;
70 71
import eu.etaxonomy.taxeditor.store.UsageTermCollection;
71 72
import eu.etaxonomy.taxeditor.ui.element.RootElement;
72 73
import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
......
398 399
    }
399 400

  
400 401
    private void createGroupSection(RootElement parent) {
401
        GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, getSectionStyle(GroupDetailSection.class));
402
        MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, getSectionStyle(MemberDetailSection.class));
403
        GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,getSectionStyle(GrantedAuthorityDetailSection.class));
402
        GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(GroupDetailSection.class, getInput().getClass().getCanonicalName()));
403
        MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(MemberDetailSection.class, getInput().getClass().getCanonicalName()));
404
        GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,StoreUtil.getSectionStyle(GrantedAuthorityDetailSection.class, getInput().getClass().getCanonicalName()));
404 405

  
405 406
        addPart(groupDetailSection);
406 407
        addPart(memberDetailSection);
......
429 430
    private void createTaxonSections(RootElement parent) {
430 431
        NameDetailsConfigurator config = PreferencesUtil.getPreferredNameDetailsConfiguration();
431 432
        ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
432
                getSectionStyle(ParsingMessagesSection.class, true));
433
                StoreUtil.getSectionStyle(ParsingMessagesSection.class, getInput().getClass().getCanonicalName(), true));
433 434
        if (!config.isSimpleDetailsViewActivated()){
434 435
            TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
435
                    getSectionStyle(TaxonBaseDetailSection.class, true));
436
                    StoreUtil.getSectionStyle(TaxonBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
436 437
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
437 438
            addPart(taxonBaseDetailSection);
438 439
        }else{
439 440
            if (config.isTaxonSectionActivated()){
440 441
                TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
441
                        getSectionStyle(TaxonBaseDetailSection.class, true));
442
                        StoreUtil.getSectionStyle(TaxonBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
442 443
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
443 444
                addPart(taxonBaseDetailSection);
444 445
            }
445 446
        }
446 447
        NonViralNameDetailSection nonViralNameSection = formFactory
447 448
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
448
                        getSectionStyle(NonViralNameDetailSection.class, true));
449
                        StoreUtil.getSectionStyle(NonViralNameDetailSection.class, getInput().getClass().getCanonicalName(), true));
449 450
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
450 451
        if (!config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isNomenclaturalReferenceSectionActivated())){
451 452
            NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
452
                    getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
453
                    StoreUtil.getSectionStyle(NomenclaturalReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
453 454
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
454 455
            addPart(referenceDetailSection);
455 456

  
456 457
        }
457 458
        if ( !config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isNomenclaturalStatusSectionActivated())){
458 459
            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
459
                    getSectionStyle(NomenclaturalStatusSection.class, true));
460
                    StoreUtil.getSectionStyle(NomenclaturalStatusSection.class, getInput().getClass().getCanonicalName(), true));
460 461
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
461 462
            addPart(nomenclaturalStatusSection);
462 463
        }
463 464

  
464 465
        if ( !config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isProtologueActivated())){
465
            ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, getSectionStyle(ProtologueSection.class));
466
            ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ProtologueSection.class, getInput().getClass().getCanonicalName()));
466 467
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
467 468
            addPart(protologSection);
468 469
        }
469 470

  
470 471
        if (!config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isTypeDesignationSectionActivated())){
471
            TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, getSectionStyle(TypeDesignationSection.class));
472
            TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TypeDesignationSection.class, getInput().getClass().getCanonicalName()));
472 473
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
473 474
            addPart(typeDesignationSection);
474 475
        }
475 476

  
476 477
        if (!config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() &&config.isNameRelationsSectionActivated())){
477
            NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, getSectionStyle(NameRelationshipDetailSection.class));
478
            NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(NameRelationshipDetailSection.class, getInput().getClass().getCanonicalName()));
478 479
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
479 480
            addPart(nameRelationshipSection);
480 481
        }
......
488 489

  
489 490
    private void createNameSections(RootElement parent) {
490 491
        NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
491
                getConversationHolder(), parent, this, false, getSectionStyle(NonViralNameDetailSection.class, true));
492
                getConversationHolder(), parent, this, false, StoreUtil.getSectionStyle(NonViralNameDetailSection.class, getInput().getClass().getCanonicalName(), true));
492 493

  
493 494
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
494 495

  
495 496
        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
496
                getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
497
                StoreUtil.getSectionStyle(NomenclaturalReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
497 498
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
498 499

  
499 500
        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
500
                getSectionStyle(NomenclaturalStatusSection.class, true));
501
                StoreUtil.getSectionStyle(NomenclaturalStatusSection.class, getInput().getClass().getCanonicalName(), true));
501 502
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
502 503

  
503 504
        addPart(nonViralNameSection);
504 505
        addPart(nomenclaturalStatusSection);
505 506
        addPart(referenceDetailSection);
506 507

  
507
        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, getSectionStyle(ProtologueSection.class));
508
        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ProtologueSection.class, getInput().getClass().getCanonicalName()));
508 509
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
509 510

  
510
        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, getSectionStyle(TypeDesignationSection.class));
511
        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TypeDesignationSection.class, getInput().getClass().getCanonicalName()));
511 512
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
512 513

  
513
        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, getSectionStyle(NameRelationshipDetailSection.class));
514
        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(NameRelationshipDetailSection.class, getInput().getClass().getCanonicalName()));
514 515
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
515 516
        addPart(protologSection);
516 517
        addPart(typeDesignationSection);
......
520 521

  
521 522
    private void createReferenceSections(RootElement parent) {
522 523
        ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
523
                getSectionStyle(ReferenceDetailSection.class, true));
524
                StoreUtil.getSectionStyle(ReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
524 525

  
525 526
        addPart(referenceDetailSection);
526 527
    }
527 528

  
528 529
    private void createTeamOrPersonBaseDetailSection(RootElement parent) {
529
        TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, getSectionStyle(TeamOrPersonBaseDetailSection.class, true));
530
        TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TeamOrPersonBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
530 531

  
531 532
        addPart(teamOrPersonBaseDetailSection);
532 533
    }
533 534

  
534 535
    private void createTeamDetailSection(RootElement parent) {
535
        TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, getSectionStyle(TeamDetailSection.class, true));
536
        TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TeamDetailSection.class, getInput().getClass().getCanonicalName(), true));
536 537

  
537 538
        addPart(teamDetailSection);
538 539
    }
539 540

  
540 541
    private void createPersonDetailSection(RootElement parent) {
541
        PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, getSectionStyle(PersonDetailSection.class, true));
542
        PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(PersonDetailSection.class, getInput().getClass().getCanonicalName(), true));
542 543
        addPart(personDetailSection);
543 544
    }
544 545

  
545 546
    private void createDescriptionElementSection(RootElement parent) {
546
        DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionElementDetailSection.class, true));
547
        DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionElementDetailSection.class, getInput().getClass().getCanonicalName(), true));
547 548
        descriptionElementDetailSection.setEnabled(this.detailsEnabled);
548 549

  
549
        //  IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent,  getSectionStyle(.class));
550
        //  IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent,  getSectionStyle(.class, getInput().getClass().getCanonicalName()));
550 551

  
551 552
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
552 553

  
553
        DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, getSectionStyle(DescriptionElementSourceSection.class));
554
        DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionElementSourceSection.class, getInput().getClass().getCanonicalName()));
554 555

  
555 556
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
556 557

  
557
        DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, getSectionStyle(DescriptionElementMediaSection.class));
558
        DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionElementMediaSection.class, getInput().getClass().getCanonicalName()));
558 559

  
559 560
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
560 561

  
......
564 565
    }
565 566

  
566 567
    private void createDescriptionSection(RootElement parent, boolean isTaxonDescription) {
567
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionDetailSection.class, true));
568
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionDetailSection.class, getInput().getClass().getCanonicalName(), true));
568 569
        addPart(descriptionDetailSection);
569 570

  
570 571
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
571 572

  
572 573
        if(isTaxonDescription) {
573 574
            NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(
574
                    getConversationHolder(), parent, this, getSectionStyle(NaturalLanguageSection.class, true));
575
                    getConversationHolder(), parent, this, StoreUtil.getSectionStyle(NaturalLanguageSection.class, getInput().getClass().getCanonicalName(), true));
575 576
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
576 577
            addPart(naturalLanguageSection);
577 578
        }
578 579
        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(
579
                getConversationHolder(), parent, getSectionStyle(DescriptionSourceSection.class, true));
580
                getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionSourceSection.class, getInput().getClass().getCanonicalName(), true));
580 581
        addPart(descriptionSourceSection);
581 582

  
582 583
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
583 584

  
584 585
        if(isTaxonDescription) {
585
            ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, getSectionStyle(ScopeSection.class));
586
            ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ScopeSection.class, getInput().getClass().getCanonicalName()));
586 587
            addPart(scopeSection);
587 588
        }
588 589
    }
......
596 597
    }
597 598

  
598 599
    private void createUseDescriptionSection(RootElement parent) {
599
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionDetailSection.class));
600
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionDetailSection.class, getInput().getClass().getCanonicalName()));
600 601

  
601 602
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
602 603

  
603
        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, getSectionStyle(DescriptionSourceSection.class));
604
        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionSourceSection.class, getInput().getClass().getCanonicalName()));
604 605

  
605 606
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
606 607

  
......
610 611
    }
611 612

  
612 613
    private void createImageGallerySection(RootElement parent) {
613
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionDetailSection.class));
614
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionDetailSection.class, getInput().getClass().getCanonicalName()));
614 615

  
615 616
        addPart(descriptionDetailSection);
616 617
    }
617 618

  
618 619
    private void createMediaElementSection(RootElement parent) {
619
        MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, getSectionStyle(MediaDetailsSection.class));
620
        MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(MediaDetailsSection.class, getInput().getClass().getCanonicalName()));
620 621

  
621 622
        addPart(mediaDetailSection);
622 623
    }
623 624

  
624 625
    private void createDerivedUnitBaseElementSection(RootElement parent) {
625
        DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(DerivedUnitGeneralDetailSection.class, true));
626
        DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DerivedUnitGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
626 627
        //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
627 628
        if(!(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart)){
628 629
            derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
......
631 632

  
632 633
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
633 634

  
634
        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, getSectionStyle(DerivedUnitBaseDetailSection.class, true));
635
        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DerivedUnitBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
635 636
        addPart(derivedUnitBaseDetailSection);
636 637

  
637 638
        //for editors working with facades
638 639
        if(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart){
639 640
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
640
            GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, getSectionStyle(GatheringEventDetailSection.class));
641
            GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(GatheringEventDetailSection.class, getInput().getClass().getCanonicalName()));
641 642
            addPart(gatheringEventDetailSection);
642 643

  
643 644
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
644
            FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, getSectionStyle(FieldUnitDetailSection.class));
645
            FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FieldUnitDetailSection.class, getInput().getClass().getCanonicalName()));
645 646
            addPart(fieldUnitDetailSection);
646 647
        }
647 648
        else{
648 649

  
649 650
            if(PreferencesUtil.isShowTaxonAssociations()){
650 651
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
651
                TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, getSectionStyle(TaxonAssociationDetailSection.class, true));
652
                TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TaxonAssociationDetailSection.class, getInput().getClass().getCanonicalName(), true));
652 653
                addPart(taxonAssociationDetailSection);
653 654
            }
654 655
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
655
            DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, getSectionStyle(DerivedUnitFacadeIdentifierSection.class));
656
            DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DerivedUnitFacadeIdentifierSection.class, getInput().getClass().getCanonicalName()));
656 657
            addPart(identifierDetailSection);
657 658
        }
658 659
        if(!PreferencesUtil.isDeterminationOnlyForFieldUnits()){
659 660
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
660
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, getSectionStyle(DeterminationDetailSection.class));
661
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DeterminationDetailSection.class, getInput().getClass().getCanonicalName()));
661 662
            addPart(determinationDetailSection);
662 663
        }
663 664

  
664 665
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
665
        DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, getSectionStyle(DerivedUnitTypeDesignationSection.class));
666
        DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DerivedUnitTypeDesignationSection.class, getInput().getClass().getCanonicalName()));
666 667
        addPart(derivedUnitTypeDesignationSection);
667 668

  
668 669
    }
669 670

  
670 671
    private void createFieldUnitSection(RootElement parent) {
671
        FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(FieldUnitGeneralDetailSection.class, true));
672
        FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FieldUnitGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
672 673

  
673 674
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
674 675

  
675
        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, getSectionStyle(GatheringEventDetailSection.class));
676
        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(GatheringEventDetailSection.class, getInput().getClass().getCanonicalName()));
676 677

  
677 678
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
678 679

  
679
        FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, getSectionStyle(FieldUnitDetailSection.class));
680
        FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FieldUnitDetailSection.class, getInput().getClass().getCanonicalName()));
680 681

  
681 682
        addPart(fielUnitGeneralDetailSection);
682 683
        addPart(gatheringEventDetailSection);
......
684 685

  
685 686
        if(PreferencesUtil.isDeterminationOnlyForFieldUnits()){
686 687
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
687
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, getSectionStyle(DeterminationDetailSection.class));
688
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DeterminationDetailSection.class, getInput().getClass().getCanonicalName()));
688 689
            addPart(determinationDetailSection);
689 690
        }
690 691
    }
691 692

  
692 693
    private void createTissueSampleSection(RootElement parent) {
693
        TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(TissueSampleGeneralDetailSection.class, true));
694
        TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TissueSampleGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
694 695

  
695 696
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
696 697

  
697
        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, getSectionStyle(SampleDesignationDetailSection.class, true));
698
        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SampleDesignationDetailSection.class, getInput().getClass().getCanonicalName(), true));
698 699

  
699 700
        addPart(section);
700 701
        addPart(sampleDesignationDetailSection);
701 702
    }
702 703

  
703 704
    private void createDnaSampleSection(RootElement parent) {
704
        DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(DnaSampleGeneralDetailSection.class, true));
705
        DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DnaSampleGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
705 706

  
706 707
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
707 708

  
708
        DnaSamplePreparationPreservationSection preparationPreservationSection = formFactory.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent, this, getSectionStyle(DnaSamplePreparationPreservationSection.class, true));
709
        DnaSamplePreparationPreservationSection preparationPreservationSection = formFactory.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DnaSamplePreparationPreservationSection.class, getInput().getClass().getCanonicalName(), true));
709 710

  
710 711
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
711 712

  
712
        DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, getSectionStyle(DnaQualityDetailSection.class, true));
713
        DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DnaQualityDetailSection.class, getInput().getClass().getCanonicalName(), true));
713 714

  
714 715
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
715 716

  
716
        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, getSectionStyle(SampleDesignationDetailSection.class, true));
717
        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SampleDesignationDetailSection.class, getInput().getClass().getCanonicalName(), true));
717 718

  
718 719
        addPart(section);
719 720
        addPart(preparationPreservationSection);
......
722 723
    }
723 724

  
724 725
    private void createSequenceSection(RootElement parent) {
725
        SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(SequenceGeneralDetailSection.class, true));
726
        SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SequenceGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
726 727

  
727 728
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
728 729

  
729
        SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, getSectionStyle(SequenceReferenceCollectionDetailSection.class, true));
730
        SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(SequenceReferenceCollectionDetailSection.class, getInput().getClass().getCanonicalName(), true));
730 731

  
731 732
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
732 733

  
733
        SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, getSectionStyle(SequenceContigFileCollectionDetailSection.class, true));
734
        SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(SequenceContigFileCollectionDetailSection.class, getInput().getClass().getCanonicalName(), true));
734 735

  
735 736

  
736 737
        addPart(section);
......
739 740
    }
740 741

  
741 742
    private void createSingleReadSection(RootElement parent) {
742
        SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(SingleReadGeneralDetailSection.class, true));
743
        SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SingleReadGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
743 744
        addPart(section);
744 745

  
745 746
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
746 747

  
747
        SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, getSectionStyle(SingleReadPherogramCollectionDetailSection.class, true));
748
        SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(SingleReadPherogramCollectionDetailSection.class, getInput().getClass().getCanonicalName(), true));
748 749
        addPart(pherogramSection);
749 750

  
750 751
    }
751 752

  
752 753
    private void createMediaSpecimenSection(RootElement parent) {
753
        MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(MediaSpecimenGeneralDetailSection.class, true));
754
        MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(MediaSpecimenGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
754 755
        addPart(generalSection);
755 756

  
756 757
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
757 758

  
758
        RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, getSectionStyle(RightsSection.class));
759
        RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(RightsSection.class, getInput().getClass().getCanonicalName()));
759 760
        addPart(rightsSection);
760 761

  
761 762
    }
762 763

  
763 764
    private void createFeatureTreeSection(RootElement parent) {
764
        FeatureTreeDetailSection section = formFactory.createFeatureTreeDetailSection(getConversationHolder(), parent, this, getSectionStyle(FeatureTreeDetailSection.class, true));
765
        FeatureTreeDetailSection section = formFactory.createFeatureTreeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FeatureTreeDetailSection.class, getInput().getClass().getCanonicalName(), true));
765 766

  
766 767
        addPart(section);
767 768
    }
768 769

  
769 770
    private void createFeatureNodeSection(RootElement parent) {
770
        FeatureNodeDetailSection featureDistributionSection = formFactory.createFeatureNodeDetailSection(getConversationHolder(), parent, this, getSectionStyle(FeatureNodeDetailSection.class, true));
771
        FeatureNodeDetailSection featureDistributionSection = formFactory.createFeatureNodeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FeatureNodeDetailSection.class, getInput().getClass().getCanonicalName(), true));
771 772

  
772 773
        addPart(featureDistributionSection);
773 774
    }
774 775

  
775 776
    private void createFeatureDistributionSection(RootElement parent) {
776
        FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, getSectionStyle(FeatureDistributionDetailSection.class, true));
777
        FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FeatureDistributionDetailSection.class, getInput().getClass().getCanonicalName(), true));
777 778

  
778 779
        addPart(featureDistributionSection);
779 780
    }
780 781

  
781 782
    private void createCharacterSection(RootElement parent) {
782
        CharacterDetailSection featureDistributionSection = formFactory.createCharacterDetailSection(getConversationHolder(), parent, this, getSectionStyle(CharacterDetailSection.class, true));
783
        CharacterDetailSection featureDistributionSection = formFactory.createCharacterDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(CharacterDetailSection.class, getInput().getClass().getCanonicalName(), true));
783 784

  
784 785
        addPart(featureDistributionSection);
785 786
    }
786 787

  
787 788
    private void createPolytomousKeyNodeSection(RootElement parent) {
788
        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, getSectionStyle(PolytomousKeyDetailSection.class));
789
        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(PolytomousKeyDetailSection.class, getInput().getClass().getCanonicalName()));
789 790

  
790 791
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
791 792

  
792
        PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, getSectionStyle(PolytomousKeyNodeDetailSection.class, true));
793
        PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(PolytomousKeyNodeDetailSection.class, getInput().getClass().getCanonicalName(), true));
793 794

  
794 795
        addPart(polytomousKeyDetailSection);
795 796
        addPart(polytomousKeyNodeDetailSection);
......
797 798
    }
798 799

  
799 800
    private void createUseRecordSection(RootElement parent) {
800
        UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,getSectionStyle(UseRecordDetailSection.class, true));
801
        UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,StoreUtil.getSectionStyle(UseRecordDetailSection.class, getInput().getClass().getCanonicalName(), true));
801 802

  
802 803
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
803 804

  
......
807 808
    }
808 809

  
809 810
    private void createUserSection(RootElement parent) {
810
        UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, getSectionStyle(UserDetailSection.class, true));
811
        UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(UserDetailSection.class, getInput().getClass().getCanonicalName(), true));
811 812

  
812
        GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, getSectionStyle(GroupsByUserDetailSection.class, true));
813
        GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(GroupsByUserDetailSection.class, getInput().getClass().getCanonicalName(), true));
813 814

  
814 815
        addPart(userDetailSection);
815 816
        addPart(groupByUserDetailSection);
......
817 818

  
818 819
    private void createMisappliedNameSection(RootElement parent) {
819 820
        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this,
820
                getSectionStyle(TaxonRelationshipDetailSection.class, true));
821
                StoreUtil.getSectionStyle(TaxonRelationshipDetailSection.class, getInput().getClass().getCanonicalName(), true));
821 822
        addPart(taxonRelationshipDetailSection);
822 823

  
823 824
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
825 826

  
826 827
        NonViralNameDetailSection nonViralNameSection = formFactory
827 828
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
828
                        getSectionStyle(NonViralNameDetailSection.class, true));
829
                        StoreUtil.getSectionStyle(NonViralNameDetailSection.class, getInput().getClass().getCanonicalName(), true));
829 830
        addPart(nonViralNameSection);
830 831

  
831 832
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
832 833

  
833 834
        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
834
                getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
835
                StoreUtil.getSectionStyle(NomenclaturalReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
835 836
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
836 837
        addPart(referenceDetailSection);
837 838

  
838 839

  
839 840
        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
840
            		getSectionStyle(NomenclaturalStatusSection.class, true));
841
            		StoreUtil.getSectionStyle(NomenclaturalStatusSection.class, getInput().getClass().getCanonicalName(), true));
841 842
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
842 843
        addPart(nomenclaturalStatusSection);
843 844

  
844
		ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, getSectionStyle(ProtologueSection.class));
845
		ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ProtologueSection.class, getInput().getClass().getCanonicalName()));
845 846
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
846 847
		addPart(protologSection);
847 848

  
848
		TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, getSectionStyle(TypeDesignationSection.class));
849
		TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TypeDesignationSection.class, getInput().getClass().getCanonicalName()));
849 850
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
850 851
		addPart(typeDesignationSection);
851 852

  
852
		NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, getSectionStyle(NameRelationshipDetailSection.class));
853
		NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(NameRelationshipDetailSection.class, getInput().getClass().getCanonicalName()));
853 854
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
854 855
		addPart(nameRelationshipSection);
855 856

  
856 857
    }
857 858

  
858 859
    private void createTaxonRelationshipSection(RootElement parent) {
859
        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, getSectionStyle(TaxonRelationshipDetailSection.class, true));
860
        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TaxonRelationshipDetailSection.class, getInput().getClass().getCanonicalName(), true));
860 861

  
861
        ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, getSectionStyle(ReferencedEntityDetailSection.class, true));
862
        ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(ReferencedEntityDetailSection.class, getInput().getClass().getCanonicalName(), true));
862 863
        addPart(taxonRelationshipDetailSection);
863 864
        addPart(referencedEntityBaseDetailSection);
864 865
    }
865 866
    private void createTermVocabularySection(RootElement parent) {
866
        TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, getSectionStyle(TermVocabularyDetailSection.class, true));
867
        TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TermVocabularyDetailSection.class, getInput().getClass().getCanonicalName(), true));
867 868
        addPart(termVocabularyDetailSection);
868 869
    }
869 870

  
870 871
    private void createDefinedTermSection(RootElement parent) {
871
        DefinedTermDetailSection definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, getSectionStyle(DefinedTermDetailSection.class, true));
872
        DefinedTermDetailSection definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DefinedTermDetailSection.class, getInput().getClass().getCanonicalName(), true));
872 873
        addPart(definedTermDetailSection);
873
        TermMediaSection termMediaSection = formFactory.createTermMediaSection(getConversationHolder(), parent, getSectionStyle(DefinedTermDetailSection.class, true));
874
        TermMediaSection termMediaSection = formFactory.createTermMediaSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DefinedTermDetailSection.class, getInput().getClass().getCanonicalName(), true));
874 875
        addPart(termMediaSection);
875 876
    }
876 877

  

Also available in: Unified diff