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.detail;
11

    
12
import java.util.Set;
13

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

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

    
117
/**
118
 *
119
 * The DetailsViewer handles the content of the details view (
120
 * {@link DetailsViewPart}).<br>
121
 * Depending on the type of the selected element the section of the details view
122
 * are created.
123
 *
124
 * @author n.hoffmann
125
 * @created Feb 12, 2010
126
 * @version 1.0
127
 */
128
public class DetailsViewer extends AbstractCdmDataViewer {
129

    
130
    private ISelection selection;
131

    
132
    public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
133
        super(parent, viewPart);
134
    }
135

    
136
    // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
137
    // since we are getting implementations of DerivedUnitBase from the bulk
138
    // editor
139
    // and not derived unit facade objects,
140

    
141
    @Override
142
    public void setInput(Object input) {
143
        if(input instanceof TreeNode){
144
            input = ((TreeNode) input).getValue();
145
        }
146
        if(input instanceof GbifResponse){
147
            input = ((GbifResponse) input).getDerivedUnitFacade();
148
        }
149
        if (input.getClass().equals(DerivedUnit.class)) {
150
            DerivedUnit derivedUnit = (DerivedUnit)input;
151
            try {
152
                input = DerivedUnitFacade.NewInstance(derivedUnit,
153
                        PreferencesUtil.getDerivedUnitConfigurator());
154
            } catch (DerivedUnitFacadeNotSupportedException e) {
155
//                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
156
            }
157
        }
158
        else if(input instanceof FieldUnit){
159
            input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
160
        }
161
        super.setInput(input);
162
    }
163

    
164
    @Override
165
    protected void markViewPartDirty() {
166
        if (getInput() instanceof DerivedUnitFacade) {
167
            DerivedUnitFacade facade = (DerivedUnitFacade) getInput();
168
            if(facade.innerDerivedUnit()!=null){
169
                getViewPart().changed(facade.innerDerivedUnit());
170
            }
171
            else if(facade.innerFieldUnit()!=null){
172
                getViewPart().changed(facade.innerFieldUnit());
173
            }
174
        }
175
        else{
176
            super.markViewPartDirty();
177
        }
178
    }
179

    
180
    // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
181

    
182

    
183
    /** {@inheritDoc} */
184
    @Override
185
    protected void showParts() {
186
        // FIXME (CM) : Need to clean out this code.
187
        // Too much type checking to decide which detail view to display.
188
        // Need to build in a mechanism where navigators / editors are 'aware'
189
        // of the corresponding detail viewer.
190
        Object input = getInput();
191

    
192
        destroySections();
193
        if (input instanceof TaxonBase) {
194
            if(((TaxonBase) input).getName()==null){
195
                createEmptySection(rootElement);
196
            }
197
            else{
198
                createTaxonSections(rootElement);
199
            }
200

    
201
        } else if (input instanceof TaxonName) {
202
            createNameSections(rootElement);
203

    
204
        } else if (input instanceof Reference) {
205
            createReferenceSections(rootElement);
206

    
207
        } else if (input instanceof Team) {
208
            createTeamDetailSection(rootElement);
209

    
210
        } else if (input instanceof Person) {
211
            createPersonDetailSection(rootElement);
212

    
213
        } else if (input instanceof TeamOrPersonBase) {
214
            createTeamOrPersonBaseDetailSection(rootElement);
215

    
216
        } else if (input instanceof DescriptionBase) {
217
            if(input instanceof SpecimenDescription){
218
                //TODO: add more sections to DetailsView for SpecimenDescription
219
                createSpecimenDescriptionSection(rootElement);
220
            }
221
            else{
222
                Set<Marker> descriptionMarkers = ((DescriptionBase<?>) input).getMarkers();
223

    
224
                Boolean isUseDescription = false;
225
                for (Marker marker : descriptionMarkers) {
226
                    if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
227
                        isUseDescription = true;
228
                    }
229
                }
230
                if (((DescriptionBase<?>) input).isImageGallery()) {
231
                    createImageGallerySection(rootElement);
232

    
233
                } else if (isUseDescription) {
234
                    createUseDescriptionSection(rootElement);
235
                } else {
236
                    createDescriptionSection(rootElement);
237

    
238
                }
239
            }
240
        } else if (input instanceof DescriptionElementBase) {
241
            Set<Marker> descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
242

    
243
            Boolean isUseDescription = false;
244
            for (Marker marker : descriptionMarkers) {
245
                if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
246
                    isUseDescription = true;
247
                }
248
            }
249

    
250
            if (isUseDescription == true && input instanceof CategoricalData) {
251
                createUseRecordSection(rootElement);
252
            } else {
253
                createDescriptionElementSection(rootElement);
254
            }
255

    
256
        } else if (input instanceof Media) {
257
            createMediaElementSection(rootElement);
258

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

    
304
        }else if ((input instanceof PolytomousKeyNode) || (input instanceof PolytomousKeyRelationship)) {
305
            createPolytomousKeyNodeSection(rootElement);
306
        } else if (input instanceof User) {
307
            createUserSection(rootElement);
308
        } else if (input instanceof Group) {
309
            createGroupSection(rootElement);
310
        } else if (input instanceof TaxonRelationship) {
311
            createTaxonRelationshipSection(rootElement);
312
        } else if (input instanceof TermVocabulary) {
313
            createTermVocabularySection(rootElement);
314
        } else if (input instanceof DefinedTermBase) {
315
            createDefinedTermSection(rootElement);
316
        }
317
        else {
318
            createEmptySection(rootElement);
319
        }
320
        layout();
321
    }
322

    
323

    
324
    private void createEmptySection(RootElement parent) {
325
        destroySections();
326

    
327
        EmptySection emptySection = formFactory.createEmptySection(formFactory, parent, SWT.NONE);
328

    
329
        addPart(emptySection);
330
    }
331

    
332
    private void createGroupSection(RootElement parent) {
333
        destroySections();
334

    
335
        GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
336
        MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
337
        GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
338

    
339
        addPart(groupDetailSection);
340
        addPart(memberDetailSection);
341
        addPart(grantedAuthorityDetailSection);
342
    }
343

    
344
    /** {@inheritDoc} */
345
    @Override
346
    public ISelection getSelection() {
347
        return selection;
348
    }
349

    
350
    /** {@inheritDoc} */
351
    @Override
352
    public void setSelection(ISelection selection, boolean reveal) {
353
        this.selection = selection;
354
        if(this.selection!=null){
355
            SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
356
            fireSelectionChanged(selectionChangedEvent);
357
        }
358
    }
359

    
360
    private void createTaxonSections(RootElement parent) {
361
        destroySections();
362

    
363
        ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
364
                ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
365
        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
366
        	TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
367
	        ExpandableComposite.TWISTIE	| ExpandableComposite.EXPANDED);
368
	        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
369
	        addPart(taxonBaseDetailSection);
370
        }else{
371
        	if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
372
	            TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
373
	            		ExpandableComposite.TWISTIE	| ExpandableComposite.EXPANDED);
374
	            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
375

    
376
	            addPart(taxonBaseDetailSection);
377
        	}
378
        }
379
        NonViralNameDetailSection nonViralNameSection = formFactory
380
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
381
                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
382
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
383
        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))){
384
	            NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
385
	            		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
386
	            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
387
	            addPart(referenceDetailSection);
388

    
389
        }
390
        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))){
391
	            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
392
	            		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
393
	            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
394
	            addPart(nomenclaturalStatusSection);
395
        }
396

    
397
    	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))){
398
    		ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
399
    		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
400
    		addPart(protologSection);
401
    	}
402

    
403
    	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))){
404
    		TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
405
    		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
406
    		addPart(typeDesignationSection);
407
    	}
408

    
409
    	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))){
410
    		NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
411
    		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
412
    		addPart(nameRelationshipSection);
413
    	}
414

    
415

    
416
        addPart(parsingMessagesSection);
417

    
418
        addPart(nonViralNameSection);
419

    
420
    }
421

    
422
    private void createNameSections(RootElement parent) {
423
        destroySections();
424
        NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
425
                getConversationHolder(), parent, this, false, ExpandableComposite.TWISTIE
426
                        | ExpandableComposite.EXPANDED);
427
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
428

    
429
        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
430
        		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
431
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
432

    
433
        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
434
        		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
435
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
436

    
437
        addPart(nonViralNameSection);
438
        addPart(nomenclaturalStatusSection);
439
        addPart(referenceDetailSection);
440

    
441
		ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
442
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
443

    
444
        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
445
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
446

    
447
        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
448
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
449
        addPart(protologSection);
450
        addPart(typeDesignationSection);
451
        addPart(nameRelationshipSection);
452

    
453
    }
454

    
455
    private void createReferenceSections(RootElement parent) {
456
        destroySections();
457

    
458
        ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
459
        		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
460

    
461
        addPart(referenceDetailSection);
462
    }
463

    
464
    private void createTeamOrPersonBaseDetailSection(RootElement parent) {
465
        destroySections();
466
        TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
467

    
468
        addPart(teamOrPersonBaseDetailSection);
469
    }
470

    
471
    private void createTeamDetailSection(RootElement parent) {
472
        destroySections();
473
        TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
474

    
475
        addPart(teamDetailSection);
476
    }
477

    
478
    private void createPersonDetailSection(RootElement parent) {
479
        destroySections();
480
        PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
481
        addPart(personDetailSection);
482
    }
483

    
484
    private void createDescriptionElementSection(RootElement parent) {
485
        destroySections();
486

    
487
        DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
488

    
489
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
490

    
491
        DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
492

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

    
495
        DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
496

    
497
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
498

    
499
        addPart(descriptionElementDetailSection);
500
        addPart(descriptionElementSourceSection);
501
        addPart(descriptionElementMediaSection);
502
    }
503

    
504
    private void createDescriptionSection(RootElement parent) {
505
        destroySections();
506
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
507

    
508
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
509

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

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

    
514
//        DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
515
//
516
//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
517

    
518
        //		DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
519
        //				.createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
520
        //						getConversationHolder(), parent, Section.TWISTIE);
521
        //
522
        //		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
523

    
524
        ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
525

    
526
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
527

    
528
        addPart(descriptionDetailSection);
529
        addPart(naturalLanguageSection);
530
//        addPart(describedSpecimenSection);
531
        //		addPart(descriptionSourceSection);
532
        addPart(scopeSection);
533
    }
534

    
535
    private void createSpecimenDescriptionSection(RootElement parent) {
536
        destroySections();
537
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
538
        addPart(descriptionDetailSection);
539
    }
540

    
541
    private void createUseDescriptionSection(RootElement parent) {
542
        destroySections();
543
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
544

    
545
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
546

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

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

    
551
        addPart(descriptionDetailSection);
552
        addPart(descriptionSourceSection);
553

    
554
    }
555

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

    
560
        addPart(descriptionDetailSection);
561
    }
562

    
563
    private void createMediaElementSection(RootElement parent) {
564
        destroySections();
565

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

    
568
        addPart(mediaDetailSection);
569
    }
570

    
571
    private void createDerivedUnitBaseElementSection(RootElement parent) {
572
        destroySections();
573

    
574
        DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
575
        //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
576
        if(!(AbstractUtility.getActiveE4Part() instanceof IDerivedUnitFacadePart)){
577
            derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
578
        }
579
        addPart(derivedUnitGeneralDetailSection);
580

    
581
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
582

    
583
        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
584
        addPart(derivedUnitBaseDetailSection);
585

    
586
        //for editors working with facades
587
        if(AbstractUtility.getActiveE4Part() instanceof IDerivedUnitFacadePart){
588
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
589
            GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
590
            addPart(gatheringEventDetailSection);
591

    
592
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
593
            FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
594
            addPart(fieldUnitDetailSection);
595
        }
596
        else{
597

    
598
            if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
599
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
600
                TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
601
                addPart(taxonAssociationDetailSection);
602
            }
603
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
604
            DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
605
            addPart(identifierDetailSection);
606
        }
607
        if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
608
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
609
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
610
            addPart(determinationDetailSection);
611
        }
612

    
613
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
614
        DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
615
        addPart(derivedUnitTypeDesignationSection);
616

    
617
    }
618

    
619
    private void createFieldUnitSection(RootElement parent) {
620
        destroySections();
621

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

    
624
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
625

    
626
        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
627

    
628
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
629

    
630
        FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
631

    
632
        addPart(fielUnitGeneralDetailSection);
633
        addPart(gatheringEventDetailSection);
634
        addPart(fieldUnitDetailSection);
635

    
636
        if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
637
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
638
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
639
            addPart(determinationDetailSection);
640
        }
641
    }
642

    
643
    private void createTissueSampleSection(RootElement parent) {
644
        destroySections();
645

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

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

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

    
652
        addPart(section);
653
        addPart(sampleDesignationDetailSection);
654
    }
655

    
656
    private void createDnaSampleSection(RootElement parent) {
657
        destroySections();
658

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

    
661
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
662

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

    
665
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
666

    
667
        DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(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(preparationPreservationSection);
675
        addPart(qualitySection);
676
        addPart(sampleDesignationDetailSection);
677
    }
678

    
679
    private void createSequenceSection(RootElement parent) {
680
        destroySections();
681

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

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

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

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

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

    
692

    
693
        addPart(section);
694
        addPart(referenceSection);
695
        addPart(contigFileSection);
696
    }
697

    
698
    private void createSingleReadSection(RootElement parent) {
699
        destroySections();
700

    
701
        SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
702
        addPart(section);
703

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

    
706
        SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
707
        addPart(pherogramSection);
708

    
709
    }
710

    
711
    private void createMediaSpecimenSection(RootElement parent) {
712
        destroySections();
713

    
714
        MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
715
        addPart(generalSection);
716

    
717
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
718

    
719
        RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
720
        addPart(rightsSection);
721

    
722
    }
723

    
724
    private void createFeatureDistributionSection(RootElement parent) {
725
        destroySections();
726

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

    
729
        addPart(featureDistributionSection);
730
    }
731

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

    
735
        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
736

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

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

    
741
        addPart(polytomousKeyDetailSection);
742
        addPart(polytomousKeyNodeDetailSection);
743

    
744
    }
745

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

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

    
751
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
752

    
753
        addPart(descriptionUseRecordSection);
754

    
755

    
756
    }
757

    
758
    private void createUserSection(RootElement parent) {
759
        destroySections();
760

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

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

    
765
        addPart(userDetailSection);
766
        addPart(groupByUserDetailSection);
767
    }
768

    
769
    private void createTaxonRelationshipSection(RootElement parent) {
770
        destroySections();
771

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

    
774
       // ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
775
        addPart(taxonRelationshipDetailSection);
776
     //   addPart(referencedEntityBaseDetailSection);
777
        NonViralNameDetailSection nonViralNameSection = formFactory
778
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
779
                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
780
        addPart(nonViralNameSection);
781
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
782
        //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))){
783
        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
784
        		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
785
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
786
        addPart(referenceDetailSection);
787

    
788
        //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))){
789
            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
790
            		ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
791
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
792
            addPart(nomenclaturalStatusSection);
793
    //}
794

    
795
	//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))){
796
		ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
797
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
798
		addPart(protologSection);
799
	//}
800

    
801
	//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))){
802
		TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
803
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
804
		addPart(typeDesignationSection);
805
	//}
806

    
807
	//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))){
808
		NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
809
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
810
		addPart(nameRelationshipSection);
811
	//}
812

    
813
        
814
        //}
815
    }
816

    
817
    private void createTermVocabularySection(RootElement parent) {
818
        destroySections();
819

    
820
        TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
821
        addPart(termVocabularyDetailSection);
822
    }
823

    
824
    private void createDefinedTermSection(RootElement parent) {
825
        destroySections();
826

    
827
        AbstractFormSection<?> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
828
        addPart(definedTermDetailSection);
829
    }
830

    
831
	@Override
832
	public void update(CdmDataChangeMap arg0) {
833

    
834
	}
835

    
836
}
(3-3/3)