Project

General

Profile

Download (43.9 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
 * Copyright (C) 2011 EDIT
3
 * European Distributed Institute of Taxonomy
4
 * http://www.e-taxonomy.eu
5
 *
6
 * The contents of this file are subject to the Mozilla Public License Version 1.1
7
 * See LICENSE.TXT at the top of this package for the full license terms.
8
 */
9

    
10
package eu.etaxonomy.taxeditor.view.e4.details;
11

    
12
import java.util.HashSet;
13
import java.util.Set;
14

    
15
import org.eclipse.jface.viewers.ISelection;
16
import org.eclipse.jface.viewers.IStructuredSelection;
17
import org.eclipse.jface.viewers.SelectionChangedEvent;
18
import org.eclipse.jface.viewers.TreeNode;
19
import org.eclipse.swt.SWT;
20
import org.eclipse.ui.forms.widgets.ExpandableComposite;
21

    
22
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
23
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
24
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
25
import eu.etaxonomy.cdm.model.agent.Person;
26
import eu.etaxonomy.cdm.model.agent.Team;
27
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
28
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
29
import eu.etaxonomy.cdm.model.common.Group;
30
import eu.etaxonomy.cdm.model.common.Marker;
31
import eu.etaxonomy.cdm.model.common.TermVocabulary;
32
import eu.etaxonomy.cdm.model.common.User;
33
import eu.etaxonomy.cdm.model.description.CategoricalData;
34
import eu.etaxonomy.cdm.model.description.DescriptionBase;
35
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
36
import eu.etaxonomy.cdm.model.description.Distribution;
37
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
38
import eu.etaxonomy.cdm.model.description.SpecimenDescription;
39
import eu.etaxonomy.cdm.model.media.Media;
40
import eu.etaxonomy.cdm.model.molecular.DnaSample;
41
import eu.etaxonomy.cdm.model.molecular.Sequence;
42
import eu.etaxonomy.cdm.model.molecular.SingleRead;
43
import eu.etaxonomy.cdm.model.name.TaxonName;
44
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
45
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
46
import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
47
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
48
import eu.etaxonomy.cdm.model.reference.Reference;
49
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
50
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
51
import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
52
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
53
import eu.etaxonomy.taxeditor.editor.IDistributionEditor;
54
import eu.etaxonomy.taxeditor.model.AbstractUtility;
55
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
56
import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
57
import eu.etaxonomy.taxeditor.model.MessagingUtils;
58
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
59
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
60
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
61
import eu.etaxonomy.taxeditor.store.UsageTermCollection;
62
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
63
import eu.etaxonomy.taxeditor.ui.element.RootElement;
64
import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
65
import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailSection;
66
import eu.etaxonomy.taxeditor.ui.section.agent.TeamOrPersonBaseDetailSection;
67
import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
68
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailSection;
69
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailSection;
70
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementMediaSection;
71
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceSection;
72
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceSection;
73
import eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection;
74
import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageSection;
75
import eu.etaxonomy.taxeditor.ui.section.description.ScopeSection;
76
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSection;
77
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
78
import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
79
import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
80
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
81
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
82
import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
83
import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
84
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
85
import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
86
import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
87
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
88
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
89
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
90
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
91
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
92
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
93
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.DerivedUnitTypeDesignationSection;
94
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailSection;
95
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
96
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
97
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSamplePreparationPreservationSection;
98
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailSection;
99
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceContigFileCollectionDetailSection;
100
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailSection;
101
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceReferenceCollectionDetailSection;
102
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadGeneralDetailSection;
103
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadPherogramCollectionDetailSection;
104
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailSection;
105
import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailSection;
106
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
107
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
108
import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
109
import eu.etaxonomy.taxeditor.ui.section.supplemental.identifier.DerivedUnitFacadeIdentifierSection;
110
import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
111
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
112
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
113
import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
114
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
115
import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
116
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
117
import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
118
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
119

    
120
/**
121
 *
122
 * The DetailsViewer handles the content of the details view (
123
 * {@link DetailsViewPart}).<br>
124
 * Depending on the type of the selected element the section of the details view
125
 * are created.
126
 *
127
 * @author pplitzner
128
 * @date 18.07.2017
129
 *
130
 */
131
public class DetailsViewerE4 extends AbstractCdmDataViewerE4 {
132

    
133
    private ISelection selection;
134
    private boolean detailsEnabled = true;
135

    
136
    public void setInput(Object input, Object activePart) {
137
        if (activePart instanceof IDistributionEditor){
138
            detailsEnabled = false;
139
        }else{
140
            detailsEnabled = true;
141
        }
142
        setInput(input);
143
        
144
    }
145
    // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
146
    // since we are getting implementations of DerivedUnitBase from the bulk
147
    // editor
148
    // and not derived unit facade objects,
149

    
150
    @Override
151
    public void setInput(Object input) {
152

    
153
        if(input instanceof TreeNode){
154
            input = ((TreeNode) input).getValue();
155
        }
156
        if(input instanceof GbifResponse){
157
            input = ((GbifResponse) input).getDerivedUnitFacade();
158
        }
159
        if (input !=null && input.getClass().equals(DerivedUnit.class)) {
160
            DerivedUnit derivedUnit = (DerivedUnit)input;
161
            try {
162
                input = DerivedUnitFacade.NewInstance(derivedUnit,
163
                        PreferencesUtil.getDerivedUnitConfigurator());
164
            } catch (DerivedUnitFacadeNotSupportedException e) {
165
                //                MessagingUtils.error(getClass(), e); //nothing should happen, later on the Details View will show an according information that it is not possible to open this data
166
            }
167
        }
168
        else if(input instanceof FieldUnit){
169
            input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
170
        }
171
        super.setInput(input);
172
    }
173

    
174
    @Override
175
    protected void markViewPartDirty() {
176
        if (getInput() instanceof DerivedUnitFacade) {
177
            DerivedUnitFacade facade = (DerivedUnitFacade) getInput();
178
            if(facade.innerDerivedUnit()!=null){
179
                part.changed(facade.innerDerivedUnit());
180
            }
181
            else if(facade.innerFieldUnit()!=null){
182
                part.changed(facade.innerFieldUnit());
183
            }
184
        }
185
        else{
186
            super.markViewPartDirty();
187
        }
188
    }
189

    
190
    /** {@inheritDoc} */
191
    @Override
192
    protected void showParts() {
193
        // FIXME (CM) : Need to clean out this code.
194
        // Too much type checking to decide which detail view to display.
195
        // Need to build in a mechanism where navigators / editors are 'aware'
196
        // of the corresponding detail viewer.
197

    
198
        Object input = getInput();
199

    
200
        destroySections();
201
        if (input instanceof TaxonBase) {
202
            if(((TaxonBase) input).getName()==null){
203
                createEmptySection(rootElement);
204
            }
205
            else{
206
                createTaxonSections(rootElement);
207
            }
208

    
209
        } else if (input instanceof TaxonName) {
210
            createNameSections(rootElement);
211

    
212
        } else if (input instanceof Reference) {
213
            createReferenceSections(rootElement);
214

    
215
        } else if (input instanceof Team) {
216
            createTeamDetailSection(rootElement);
217

    
218
        } else if (input instanceof Person) {
219
            createPersonDetailSection(rootElement);
220

    
221
        } else if (input instanceof TeamOrPersonBase) {
222
            createTeamOrPersonBaseDetailSection(rootElement);
223

    
224
        } else if (input instanceof DescriptionBase) {
225
            if(input instanceof SpecimenDescription){
226
                //TODO: add more sections to DetailsView for SpecimenDescription
227
                createSpecimenDescriptionSection(rootElement);
228
            }
229
            else{
230
                Set<Marker> descriptionMarkers = ((DescriptionBase<?>) input).getMarkers();
231

    
232
                Boolean isUseDescription = false;
233
                for (Marker marker : descriptionMarkers) {
234
                    if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
235
                        isUseDescription = true;
236
                    }
237
                }
238
                if (((DescriptionBase<?>) input).isImageGallery()) {
239
                    createImageGallerySection(rootElement);
240

    
241
                } else if (isUseDescription) {
242
                    createUseDescriptionSection(rootElement);
243
                } else {
244
                    createDescriptionSection(rootElement);
245

    
246
                }
247
            }
248
        } else if (input instanceof DescriptionElementBase){
249
            Set<Marker> descriptionMarkers = new HashSet<>();
250
            if(((DescriptionElementBase) input).getInDescription()!=null) {
251
                descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
252
            }
253

    
254
            Boolean isUseDescription = false;
255
            for (Marker marker : descriptionMarkers) {
256
                if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
257
                    isUseDescription = true;
258
                }
259
            }
260

    
261
            if (isUseDescription == true && input instanceof CategoricalData) {
262
                createUseRecordSection(rootElement);
263
            } else {
264
                createDescriptionElementSection(rootElement);
265
            }
266

    
267
        } else if (input instanceof Media) {
268
            createMediaElementSection(rootElement);
269

    
270
        } else if (input instanceof DerivedUnitFacade) {
271
            if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
272
                if(((DerivedUnitFacade) input).innerFieldUnit()==null){
273
                    MessagingUtils.error(DetailsViewerE4.class, "FieldUnit of facade is null", null);
274
                }
275
                else{
276
                    createFieldUnitSection(rootElement);
277
                }
278
            }
279
            else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.PreservedSpecimen){
280
                if(((DerivedUnitFacade) input).innerDerivedUnit()==null){
281
                    MessagingUtils.error(DetailsViewerE4.class, "DerivedUnit of facade is null", null);
282
                }
283
                else{
284
                    createDerivedUnitBaseElementSection(rootElement);
285
                }
286
            }
287
            else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){
288
                //TissueSample should only be created by using it's own class
289
                //in future using only one class with different SpecimenOrObservationTypes is desired
290
                createTissueSampleSection(rootElement);
291
            }
292
            else{
293
                createDerivedUnitBaseElementSection(rootElement);
294
            }
295
        } else if (input instanceof DnaSample){
296
            DnaSample dnaSample = (DnaSample)input;
297
            if(dnaSample.getRecordBasis()==SpecimenOrObservationType.TissueSample){
298
                createTissueSampleSection(rootElement);
299
            }
300
            else if(dnaSample.getRecordBasis()==SpecimenOrObservationType.DnaSample){
301
                createDnaSampleSection(rootElement);
302
            }
303
        } else if (input instanceof MediaSpecimen){
304
            createMediaSpecimenSection(rootElement);
305
        }
306
        else if(input instanceof Sequence){
307
            createSequenceSection(rootElement);
308
        }
309
        else if(input instanceof SingleRead){
310
            createSingleReadSection(rootElement);
311
        }
312
        else if (input instanceof FeatureNodeContainer) {
313
            createFeatureDistributionSection(rootElement);
314

    
315
        }else if ((input instanceof PolytomousKeyNode) || (input instanceof PolytomousKeyRelationship)) {
316
            createPolytomousKeyNodeSection(rootElement);
317
        } else if (input instanceof User) {
318
            createUserSection(rootElement);
319
        } else if (input instanceof Group) {
320
            createGroupSection(rootElement);
321
        } else if (input instanceof TaxonRelationship && ((TaxonRelationship)input).getType()!=null
322
                && ((TaxonRelationship)input).getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())) {
323
            createMisappliedNameSection(rootElement);
324
        }else if (input instanceof TaxonRelationship ) {
325
            createTaxonRelationshipSection(rootElement);
326
        } else if (input instanceof TermVocabulary) {
327
            createTermVocabularySection(rootElement);
328
        } else if (input instanceof DefinedTermBase) {
329
            createDefinedTermSection(rootElement);
330

    
331
        } else if (input instanceof SelectionChangedEvent ) {
332
            IStructuredSelection sel =(IStructuredSelection) ((SelectionChangedEvent)input).getSelection();
333
            if (sel.getFirstElement()instanceof Distribution){
334
                createDescriptionElementSection(rootElement);
335
            }
336

    
337
//            createDescriptionElementSection(rootElement);
338

    
339
        }else {
340
            createEmptySection(rootElement);
341
        }
342
        layout();
343

    
344
    }
345

    
346
    private void createGroupSection(RootElement parent) {
347
        destroySections();
348

    
349
        GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
350
        MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
351
        GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
352

    
353
        addPart(groupDetailSection);
354
        addPart(memberDetailSection);
355
        addPart(grantedAuthorityDetailSection);
356
    }
357

    
358
    /** {@inheritDoc} */
359
    @Override
360
    public ISelection getSelection() {
361
        return selection;
362
    }
363

    
364
    /** {@inheritDoc} */
365
    @Override
366
    public void setSelection(ISelection selection, boolean reveal) {
367

    
368
        this.selection = selection;
369

    
370
        if(this.selection!=null){
371
            SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
372
            fireSelectionChanged(selectionChangedEvent);
373
        }
374

    
375
    }
376

    
377
    private void createTaxonSections(RootElement parent) {
378
        destroySections();
379

    
380
        ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
381
                ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
382
        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
383
            TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
384
                    ExpandableComposite.TWISTIE	| ExpandableComposite.EXPANDED);
385
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
386
            addPart(taxonBaseDetailSection);
387
        }else{
388
            if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
389
                TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
390
                        ExpandableComposite.TWISTIE	| ExpandableComposite.EXPANDED);
391
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
392

    
393
                addPart(taxonBaseDetailSection);
394
            }
395
        }
396
        NonViralNameDetailSection nonViralNameSection = formFactory
397
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
398
                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
399
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
400
        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))){
401
            NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
402
                    ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
403
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
404
            addPart(referenceDetailSection);
405

    
406
        }
407
        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))){
408
            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
409
                    ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
410
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
411
            addPart(nomenclaturalStatusSection);
412
        }
413

    
414
        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))){
415
            ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
416
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
417
            addPart(protologSection);
418
        }
419

    
420
        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))){
421
            TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
422
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
423
            addPart(typeDesignationSection);
424
        }
425

    
426
        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))){
427
            NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
428
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
429
            addPart(nameRelationshipSection);
430
        }
431

    
432

    
433
        addPart(parsingMessagesSection);
434

    
435
        addPart(nonViralNameSection);
436

    
437
    }
438

    
439
    private void createNameSections(RootElement parent) {
440
        destroySections();
441
        NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
442
                getConversationHolder(), parent, this, false, ExpandableComposite.TWISTIE
443
                | ExpandableComposite.EXPANDED);
444

    
445
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
446

    
447
        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
448
                ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
449
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
450

    
451
        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
452
                ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
453
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
454

    
455
        addPart(nonViralNameSection);
456
        addPart(nomenclaturalStatusSection);
457
        addPart(referenceDetailSection);
458

    
459
        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
460
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
461

    
462
        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
463
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
464

    
465
        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
466
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
467
        addPart(protologSection);
468
        addPart(typeDesignationSection);
469
        addPart(nameRelationshipSection);
470

    
471
    }
472

    
473
    private void createReferenceSections(RootElement parent) {
474
        destroySections();
475

    
476
        ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
477
                ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
478

    
479
        addPart(referenceDetailSection);
480
    }
481

    
482
    private void createTeamOrPersonBaseDetailSection(RootElement parent) {
483
        destroySections();
484
        TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
485

    
486
        addPart(teamOrPersonBaseDetailSection);
487
    }
488

    
489
    private void createTeamDetailSection(RootElement parent) {
490
        destroySections();
491
        TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
492

    
493
        addPart(teamDetailSection);
494
    }
495

    
496
    private void createPersonDetailSection(RootElement parent) {
497
        destroySections();
498
        PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
499
        addPart(personDetailSection);
500
    }
501

    
502
    private void createDescriptionElementSection(RootElement parent) {
503

    
504
        destroySections();
505
        DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
506
        descriptionElementDetailSection.setEnabled(this.detailsEnabled);
507

    
508
        //  IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent,  ExpandableComposite.TWISTIE);
509

    
510
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
511

    
512
        DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
513

    
514
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
515

    
516
        DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
517

    
518
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
519

    
520
        addPart(descriptionElementDetailSection);
521
        addPart(descriptionElementSourceSection);
522
        addPart(descriptionElementMediaSection);
523
    }
524

    
525
    private void createDescriptionSection(RootElement parent) {
526
        destroySections();
527
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
528

    
529
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
530

    
531
        NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
532

    
533
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
534

    
535
        //        DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
536
        //
537
        //        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
538

    
539
        //		DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
540
        //				.createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
541
        //						getConversationHolder(), parent, Section.TWISTIE);
542
        //
543
        //		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
544

    
545
        ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
546

    
547
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
548

    
549
        addPart(descriptionDetailSection);
550
        addPart(naturalLanguageSection);
551
        //        addPart(describedSpecimenSection);
552
        //		addPart(descriptionSourceSection);
553
        addPart(scopeSection);
554
    }
555

    
556
    private void createSpecimenDescriptionSection(RootElement parent) {
557
        destroySections();
558
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
559
        addPart(descriptionDetailSection);
560
    }
561

    
562
    private void createUseDescriptionSection(RootElement parent) {
563
        destroySections();
564
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
565

    
566
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
567

    
568
        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
569

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

    
572
        addPart(descriptionDetailSection);
573
        addPart(descriptionSourceSection);
574

    
575
    }
576

    
577
    private void createImageGallerySection(RootElement parent) {
578
        destroySections();
579
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
580

    
581
        addPart(descriptionDetailSection);
582
    }
583

    
584
    private void createMediaElementSection(RootElement parent) {
585
        destroySections();
586

    
587
        MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
588

    
589
        addPart(mediaDetailSection);
590
    }
591

    
592
    private void createDerivedUnitBaseElementSection(RootElement parent) {
593
        destroySections();
594

    
595
        DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
596
        //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
597
        if(!(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart)){
598
            derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
599
        }
600
        addPart(derivedUnitGeneralDetailSection);
601

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

    
604
        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
605
        addPart(derivedUnitBaseDetailSection);
606

    
607
        //for editors working with facades
608
        if(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart){
609
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
610
            GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
611
            addPart(gatheringEventDetailSection);
612

    
613
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
614
            FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
615
            addPart(fieldUnitDetailSection);
616
        }
617
        else{
618

    
619
            if(PreferencesUtil.isShowTaxonAssociations()){
620
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
621
                TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
622
                addPart(taxonAssociationDetailSection);
623
            }
624
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
625
            DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
626
            addPart(identifierDetailSection);
627
        }
628
        if(!PreferencesUtil.isDeterminationOnlyForFieldUnits()){
629
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
630
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
631
            addPart(determinationDetailSection);
632
        }
633

    
634
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
635
        DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
636
        addPart(derivedUnitTypeDesignationSection);
637

    
638
    }
639

    
640
    private void createFieldUnitSection(RootElement parent) {
641
        destroySections();
642

    
643
        FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
644

    
645
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
646

    
647
        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
648

    
649
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
650

    
651
        FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
652

    
653
        addPart(fielUnitGeneralDetailSection);
654
        addPart(gatheringEventDetailSection);
655
        addPart(fieldUnitDetailSection);
656

    
657
        if(PreferencesUtil.isDeterminationOnlyForFieldUnits()){
658
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
659
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
660
            addPart(determinationDetailSection);
661
        }
662
    }
663

    
664
    private void createTissueSampleSection(RootElement parent) {
665
        destroySections();
666

    
667
        TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
668

    
669
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
670

    
671
        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
672

    
673
        addPart(section);
674
        addPart(sampleDesignationDetailSection);
675
    }
676

    
677
    private void createDnaSampleSection(RootElement parent) {
678
        destroySections();
679

    
680
        DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
681

    
682
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
683

    
684
        DnaSamplePreparationPreservationSection preparationPreservationSection = formFactory.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
685

    
686
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
687

    
688
        DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
689

    
690
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
691

    
692
        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
693

    
694
        addPart(section);
695
        addPart(preparationPreservationSection);
696
        addPart(qualitySection);
697
        addPart(sampleDesignationDetailSection);
698
    }
699

    
700
    private void createSequenceSection(RootElement parent) {
701
        destroySections();
702

    
703
        SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
704

    
705
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
706

    
707
        SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
708

    
709
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
710

    
711
        SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
712

    
713

    
714
        addPart(section);
715
        addPart(referenceSection);
716
        addPart(contigFileSection);
717
    }
718

    
719
    private void createSingleReadSection(RootElement parent) {
720
        destroySections();
721

    
722
        SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
723
        addPart(section);
724

    
725
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
726

    
727
        SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
728
        addPart(pherogramSection);
729

    
730
    }
731

    
732
    private void createMediaSpecimenSection(RootElement parent) {
733
        destroySections();
734

    
735
        MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
736
        addPart(generalSection);
737

    
738
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
739

    
740
        RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
741
        addPart(rightsSection);
742

    
743
    }
744

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

    
748
        FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
749

    
750
        addPart(featureDistributionSection);
751
    }
752

    
753
    private void createPolytomousKeyNodeSection(RootElement parent) {
754
        destroySections();
755

    
756
        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
757

    
758
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
759

    
760
        PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
761

    
762
        addPart(polytomousKeyDetailSection);
763
        addPart(polytomousKeyNodeDetailSection);
764

    
765
    }
766

    
767
    private void createUseRecordSection(RootElement parent) {
768
        destroySections();
769

    
770
        UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
771

    
772
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
773

    
774
        addPart(descriptionUseRecordSection);
775

    
776

    
777
    }
778

    
779
    private void createUserSection(RootElement parent) {
780
        destroySections();
781

    
782
        UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
783

    
784
        GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
785

    
786
        addPart(userDetailSection);
787
        addPart(groupByUserDetailSection);
788
    }
789

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

    
793
        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
794

    
795
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
796

    
797
        addPart(taxonRelationshipDetailSection);
798

    
799
        NonViralNameDetailSection nonViralNameSection = formFactory
800
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
801
                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
802
        addPart(nonViralNameSection);
803

    
804
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
805

    
806
        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
807
                ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
808
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
809
        addPart(referenceDetailSection);
810

    
811

    
812
        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
813
            		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
814
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
815
        addPart(nomenclaturalStatusSection);
816

    
817
		ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
818
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
819
		addPart(protologSection);
820

    
821
		TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
822
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
823
		addPart(typeDesignationSection);
824

    
825
		NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
826
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
827
		addPart(nameRelationshipSection);
828

    
829
    }
830

    
831
    private void createTaxonRelationshipSection(RootElement parent) {
832
        destroySections();
833

    
834
        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
835

    
836
        ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
837
        addPart(taxonRelationshipDetailSection);
838
        addPart(referencedEntityBaseDetailSection);
839
    }
840
    private void createTermVocabularySection(RootElement parent) {
841
        destroySections();
842

    
843
        TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
844
        addPart(termVocabularyDetailSection);
845
    }
846

    
847
    private void createDefinedTermSection(RootElement parent) {
848
        destroySections();
849

    
850
        AbstractFormSection<?> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
851
        addPart(definedTermDetailSection);
852
    }
853

    
854
    @Override
855
    public void update(CdmDataChangeMap arg0) {
856

    
857
    }
858

    
859
}
(2-2/2)