Project

General

Profile

Revision 8da50b71

ID8da50b71a609d4ee6bbdd7b4db4a172c56e5f6ce
Parent ead9700e
Child 2a6e2626

Added by Patrick Plitzner almost 2 years ago

ref #6554 Avoid double destruction of details view sections

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java
393 393
    }
394 394

  
395 395
    private void createGroupSection(RootElement parent) {
396
        destroySections();
397

  
398 396
        GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
399 397
        MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
400 398
        GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
......
424 422
    }
425 423

  
426 424
    private void createTaxonSections(RootElement parent) {
427
        destroySections();
428

  
429 425
        ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
430 426
                ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
431 427
        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
......
486 482
    }
487 483

  
488 484
    private void createNameSections(RootElement parent) {
489
        destroySections();
490 485
        NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
491 486
                getConversationHolder(), parent, this, false, ExpandableComposite.TWISTIE
492 487
                | ExpandableComposite.EXPANDED);
......
520 515
    }
521 516

  
522 517
    private void createReferenceSections(RootElement parent) {
523
        destroySections();
524

  
525 518
        ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
526 519
                ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
527 520

  
......
529 522
    }
530 523

  
531 524
    private void createTeamOrPersonBaseDetailSection(RootElement parent) {
532
        destroySections();
533 525
        TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
534 526

  
535 527
        addPart(teamOrPersonBaseDetailSection);
536 528
    }
537 529

  
538 530
    private void createTeamDetailSection(RootElement parent) {
539
        destroySections();
540 531
        TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
541 532

  
542 533
        addPart(teamDetailSection);
543 534
    }
544 535

  
545 536
    private void createPersonDetailSection(RootElement parent) {
546
        destroySections();
547 537
        PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
548 538
        addPart(personDetailSection);
549 539
    }
550 540

  
551 541
    private void createDescriptionElementSection(RootElement parent) {
552

  
553
        destroySections();
554 542
        DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
555 543
        descriptionElementDetailSection.setEnabled(this.detailsEnabled);
556 544

  
......
572 560
    }
573 561

  
574 562
    private void createDescriptionSection(RootElement parent, boolean isTaxonDescription) {
575
        destroySections();
576 563
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
577 564
        addPart(descriptionDetailSection);
578 565

  
......
605 592
    }
606 593

  
607 594
    private void createUseDescriptionSection(RootElement parent) {
608
        destroySections();
609 595
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
610 596

  
611 597
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
620 606
    }
621 607

  
622 608
    private void createImageGallerySection(RootElement parent) {
623
        destroySections();
624 609
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
625 610

  
626 611
        addPart(descriptionDetailSection);
627 612
    }
628 613

  
629 614
    private void createMediaElementSection(RootElement parent) {
630
        destroySections();
631

  
632 615
        MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
633 616

  
634 617
        addPart(mediaDetailSection);
635 618
    }
636 619

  
637 620
    private void createDerivedUnitBaseElementSection(RootElement parent) {
638
        destroySections();
639

  
640 621
        DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
641 622
        //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
642 623
        if(!(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart)){
......
683 664
    }
684 665

  
685 666
    private void createFieldUnitSection(RootElement parent) {
686
        destroySections();
687

  
688 667
        FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
689 668

  
690 669
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
707 686
    }
708 687

  
709 688
    private void createTissueSampleSection(RootElement parent) {
710
        destroySections();
711

  
712 689
        TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
713 690

  
714 691
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
720 697
    }
721 698

  
722 699
    private void createDnaSampleSection(RootElement parent) {
723
        destroySections();
724

  
725 700
        DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
726 701

  
727 702
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
743 718
    }
744 719

  
745 720
    private void createSequenceSection(RootElement parent) {
746
        destroySections();
747

  
748 721
        SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
749 722

  
750 723
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
762 735
    }
763 736

  
764 737
    private void createSingleReadSection(RootElement parent) {
765
        destroySections();
766

  
767 738
        SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
768 739
        addPart(section);
769 740

  
......
775 746
    }
776 747

  
777 748
    private void createMediaSpecimenSection(RootElement parent) {
778
        destroySections();
779

  
780 749
        MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
781 750
        addPart(generalSection);
782 751

  
......
788 757
    }
789 758

  
790 759
    private void createFeatureTreeSection(RootElement parent) {
791
        destroySections();
792

  
793 760
        FeatureTreeDetailSection section = formFactory.createFeatureTreeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
794 761

  
795 762
        addPart(section);
796 763
    }
797 764

  
798 765
    private void createFeatureNodeSection(RootElement parent) {
799
        destroySections();
800

  
801 766
        FeatureNodeDetailSection featureDistributionSection = formFactory.createFeatureNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
802 767

  
803 768
        addPart(featureDistributionSection);
804 769
    }
805 770

  
806 771
    private void createFeatureDistributionSection(RootElement parent) {
807
        destroySections();
808

  
809 772
        FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
810 773

  
811 774
        addPart(featureDistributionSection);
812 775
    }
813 776

  
814 777
    private void createCharacterSection(RootElement parent) {
815
        destroySections();
816

  
817 778
        CharacterDetailSection featureDistributionSection = formFactory.createCharacterDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
818 779

  
819 780
        addPart(featureDistributionSection);
820 781
    }
821 782

  
822 783
    private void createPolytomousKeyNodeSection(RootElement parent) {
823
        destroySections();
824

  
825 784
        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
826 785

  
827 786
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
834 793
    }
835 794

  
836 795
    private void createUseRecordSection(RootElement parent) {
837
        destroySections();
838

  
839 796
        UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
840 797

  
841 798
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
......
846 803
    }
847 804

  
848 805
    private void createUserSection(RootElement parent) {
849
        destroySections();
850

  
851 806
        UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
852 807

  
853 808
        GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
......
857 812
    }
858 813

  
859 814
    private void createMisappliedNameSection(RootElement parent) {
860
        destroySections();
861

  
862 815
        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this,
863 816
                ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
864 817
        addPart(taxonRelationshipDetailSection);
......
899 852
    }
900 853

  
901 854
    private void createTaxonRelationshipSection(RootElement parent) {
902
        destroySections();
903

  
904 855
        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
905 856

  
906 857
        ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
......
908 859
        addPart(referencedEntityBaseDetailSection);
909 860
    }
910 861
    private void createTermVocabularySection(RootElement parent) {
911
        destroySections();
912

  
913 862
        TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
914 863
        addPart(termVocabularyDetailSection);
915 864
    }
916 865

  
917 866
    private void createDefinedTermSection(RootElement parent) {
918
        destroySections();
919

  
920 867
        AbstractFormSection<?> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
921 868
        addPart(definedTermDetailSection);
922 869
    }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)