Project

General

Profile

Download (44 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().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.getActiveE4Part() 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.getActiveE4Part() 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.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
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.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
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.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
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

    
796
        addPart(taxonRelationshipDetailSection);
797

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

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

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

    
810

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

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

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

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

    
828
    }
829

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

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

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

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

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

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

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

    
856
    }
857

    
858
}
(2-2/2)