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

    
143
        setInput(input);
144
        detailsEnabled = true;
145
    }
146
    // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
147
    // since we are getting implementations of DerivedUnitBase from the bulk
148
    // editor
149
    // and not derived unit facade objects,
150

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

    
154
        if(input instanceof TreeNode){
155
            input = ((TreeNode) input).getValue();
156
        }
157
        if(input instanceof GbifResponse){
158
            input = ((GbifResponse) input).getDerivedUnitFacade();
159
        }
160
        if (input !=null && input.getClass().equals(DerivedUnit.class)) {
161
            DerivedUnit derivedUnit = (DerivedUnit)input;
162
            try {
163
                input = DerivedUnitFacade.NewInstance(derivedUnit,
164
                        PreferencesUtil.getDerivedUnitConfigurator());
165
            } catch (DerivedUnitFacadeNotSupportedException e) {
166
                //                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
167
            }
168
        }
169
        else if(input instanceof FieldUnit){
170
            input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
171
        }
172
        super.setInput(input);
173
    }
174

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

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

    
199
        Object input = getInput();
200

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
338
//            createDescriptionElementSection(rootElement);
339

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

    
345
    }
346

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

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

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

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

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

    
369
        this.selection = selection;
370

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

    
376
    }
377

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

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

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

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

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

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

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

    
433

    
434
        addPart(parsingMessagesSection);
435

    
436
        addPart(nonViralNameSection);
437

    
438
    }
439

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

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

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

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

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

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

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

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

    
472
    }
473

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

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

    
480
        addPart(referenceDetailSection);
481
    }
482

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

    
487
        addPart(teamOrPersonBaseDetailSection);
488
    }
489

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

    
494
        addPart(teamDetailSection);
495
    }
496

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

    
503
    private void createDescriptionElementSection(RootElement parent) {
504

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
576
    }
577

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

    
582
        addPart(descriptionDetailSection);
583
    }
584

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

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

    
590
        addPart(mediaDetailSection);
591
    }
592

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

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

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

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

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

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

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

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

    
639
    }
640

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
714

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

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

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

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

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

    
731
    }
732

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

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

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

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

    
744
    }
745

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

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

    
751
        addPart(featureDistributionSection);
752
    }
753

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

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

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

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

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

    
766
    }
767

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

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

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

    
775
        addPart(descriptionUseRecordSection);
776

    
777

    
778
    }
779

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

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

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

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

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

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

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

    
798
        addPart(taxonRelationshipDetailSection);
799

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

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

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

    
812

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

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

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

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

    
830
    }
831

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

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

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

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

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

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

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

    
858
    }
859

    
860
}
(2-2/2)