Project

General

Profile

Download (46.1 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 javax.inject.Inject;
16

    
17
import org.eclipse.e4.core.di.annotations.Optional;
18
import org.eclipse.e4.ui.di.UIEventTopic;
19
import org.eclipse.jface.viewers.ISelection;
20
import org.eclipse.jface.viewers.IStructuredSelection;
21
import org.eclipse.jface.viewers.SelectionChangedEvent;
22
import org.eclipse.jface.viewers.TreeNode;
23
import org.eclipse.swt.SWT;
24

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

    
130
/**
131
 *
132
 * The DetailsViewer handles the content of the details view (
133
 * {@link DetailsViewerE4}).<br>
134
 * Depending on the type of the selected element the section of the details view
135
 * are created.
136
 *
137
 * @author pplitzner
138
 * @date 18.07.2017
139
 *
140
 */
141
public class DetailsViewerE4 extends AbstractCdmDataViewerE4 {
142

    
143
    private ISelection selection;
144
    private boolean detailsEnabled = true;
145

    
146
    public boolean isDetailsEnabled() {
147
		return detailsEnabled;
148
	}
149

    
150
	public void setDetailsEnabled(boolean detailsEnabled) {
151
		this.detailsEnabled = detailsEnabled;
152
	}
153

    
154
	public void setInput(Object input, Object activePart) {
155
        if (activePart instanceof IDistributionEditor){
156
            detailsEnabled = false;
157
        }else{
158
            detailsEnabled = true;
159
        }
160
        setInput(input);
161

    
162
    }
163
    // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
164
    // since we are getting implementations of DerivedUnitBase from the bulk
165
    // editor
166
    // and not derived unit facade objects,
167

    
168
    @Override
169
    public void setInput(Object input) {
170

    
171
        if(input instanceof TreeNode){
172
            input = ((TreeNode) input).getValue();
173
        }
174
        if(input instanceof GbifResponse){
175
            input = ((GbifResponse) input).getDerivedUnitFacade();
176
        }
177
        if(input instanceof FeatureNode
178
                && HibernateProxyHelper.isInstanceOf(((FeatureNode) input).getFeature(), Character.class)){
179
            input = HibernateProxyHelper.deproxy(((FeatureNode) input).getFeature(), Character.class);
180
        }
181
        if (input !=null && input.getClass().equals(DerivedUnit.class)) {
182
            DerivedUnit derivedUnit = (DerivedUnit)input;
183
            try {
184
                input = DerivedUnitFacade.NewInstance(derivedUnit,
185
                        PreferencesUtil.getDerivedUnitConfigurator());
186
            } catch (DerivedUnitFacadeNotSupportedException e) {
187
                //                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
188
            }
189
        }
190
        else if(input instanceof FieldUnit){
191
            input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
192
        }
193
        super.setInput(input);
194
    }
195

    
196
    @Override
197
    protected void markViewPartDirty() {
198
        if (getInput() instanceof DerivedUnitFacade) {
199
            if(part instanceof IDerivedUnitFacadePart){
200
                part.changed(getInput());
201
            }
202
            else{
203
                DerivedUnitFacade facade = (DerivedUnitFacade) getInput();
204
                if(facade.innerDerivedUnit()!=null){
205
                    part.changed(facade.innerDerivedUnit());
206
                }
207
                else if(facade.innerFieldUnit()!=null){
208
                    part.changed(facade.innerFieldUnit());
209
                }
210
            }
211
        }
212
        else{
213
            super.markViewPartDirty();
214
        }
215
    }
216

    
217
    /** {@inheritDoc} */
218
    @Override
219
    protected void showParts() {
220
        // FIXME (CM) : Need to clean out this code.
221
        // Too much type checking to decide which detail view to display.
222
        // Need to build in a mechanism where navigators / editors are 'aware'
223
        // of the corresponding detail viewer.
224

    
225
        Object input = getInput();
226
        if (input == null){
227
            return;
228
        }
229
        destroySections();
230
        if (input instanceof TaxonBase) {
231
            if(((TaxonBase) input).getName()==null){
232
                createEmptySection(Messages.DetailsViewerE4_TAXON_HAS_NO_NAME, rootElement);
233
            }
234
            else{
235
                createTaxonSections(rootElement);
236
            }
237

    
238
        } else if (input instanceof TaxonName) {
239
            createNameSections(rootElement);
240

    
241
        } else if (input instanceof Reference) {
242
            createReferenceSections(rootElement);
243

    
244
        } else if (input instanceof Team) {
245
            createTeamDetailSection(rootElement);
246

    
247
        } else if (input instanceof Person) {
248
            createPersonDetailSection(rootElement);
249

    
250
        } else if (input instanceof TeamOrPersonBase) {
251
            createTeamOrPersonBaseDetailSection(rootElement);
252

    
253
        } else if (input instanceof DescriptionBase) {
254
            if(input instanceof SpecimenDescription){
255
                //TODO: add more sections to DetailsView for SpecimenDescription
256
                createSpecimenDescriptionSection(rootElement);
257
            }
258
            else{
259
                Set<Marker> descriptionMarkers = ((DescriptionBase<?>) input).getMarkers();
260

    
261
                Boolean isUseDescription = false;
262
                for (Marker marker : descriptionMarkers) {
263
                    if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
264
                        isUseDescription = true;
265
                    }
266
                }
267
                if (((DescriptionBase<?>) input).isImageGallery()) {
268
                    createImageGallerySection(rootElement);
269

    
270
                } else if (isUseDescription) {
271
                    createUseDescriptionSection(rootElement);
272
                } else {
273
                    createTaxonDescriptionSection(rootElement);
274

    
275
                }
276
            }
277
        } else if (input instanceof DescriptionElementBase){
278
            Set<Marker> descriptionMarkers = new HashSet<>();
279
            if(((DescriptionElementBase) input).getInDescription()!=null) {
280
                descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
281
            }
282

    
283
            Boolean isUseDescription = false;
284
            for (Marker marker : descriptionMarkers) {
285
                if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
286
                    isUseDescription = true;
287
                }
288
            }
289

    
290
            if (isUseDescription == true && input instanceof CategoricalData) {
291
                createUseRecordSection(rootElement);
292
            } else {
293
                createDescriptionElementSection(rootElement);
294
            }
295

    
296
        } else if (input instanceof Media) {
297
            createMediaElementSection(rootElement);
298

    
299
        }
300
        //FIXME hack to show more informative message to the user when
301
        //DerivedUnit has more than one FieldUnit #4363
302
        else if (input.getClass().equals(DerivedUnit.class)) {
303
            DerivedUnit derivedUnit = (DerivedUnit)input;
304
            try {
305
                input = DerivedUnitFacade.NewInstance(derivedUnit,
306
                        PreferencesUtil.getDerivedUnitConfigurator());
307
            } catch (DerivedUnitFacadeNotSupportedException e) {
308
                createEmptySection(e.getMessage(), rootElement);
309
            }
310
        }
311
        else if (input instanceof DerivedUnitFacade) {
312
            if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
313
                if(((DerivedUnitFacade) input).innerFieldUnit()==null){
314
                    MessagingUtils.error(DetailsViewerE4.class, "FieldUnit of facade is null", null); //$NON-NLS-1$
315
                }
316
                else{
317
                    createFieldUnitSection(rootElement);
318
                }
319
            }
320
            else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.PreservedSpecimen){
321
                if(((DerivedUnitFacade) input).innerDerivedUnit()==null){
322
                    MessagingUtils.error(DetailsViewerE4.class, "DerivedUnit of facade is null", null); //$NON-NLS-1$
323
                }
324
                else{
325
                    createDerivedUnitBaseElementSection(rootElement);
326
                }
327
            }
328
            else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){
329
                //TissueSample should only be created by using it's own class
330
                //in future using only one class with different SpecimenOrObservationTypes is desired
331
                createTissueSampleSection(rootElement);
332
            }
333
            else{
334
                createDerivedUnitBaseElementSection(rootElement);
335
            }
336
        } else if (input instanceof DnaSample){
337
            DnaSample dnaSample = (DnaSample)input;
338
            if(dnaSample.getRecordBasis()==SpecimenOrObservationType.TissueSample){
339
                createTissueSampleSection(rootElement);
340
            }
341
            else if(dnaSample.getRecordBasis()==SpecimenOrObservationType.DnaSample){
342
                createDnaSampleSection(rootElement);
343
            }
344
        } else if (input instanceof MediaSpecimen){
345
            createMediaSpecimenSection(rootElement);
346
        }
347
        else if(input instanceof Sequence){
348
            createSequenceSection(rootElement);
349
        }
350
        else if(input instanceof SingleRead){
351
            createSingleReadSection(rootElement);
352
        }
353
        else if (input instanceof FeatureNodeContainer) {
354
            createFeatureDistributionSection(rootElement);
355

    
356
        } else if (input instanceof FeatureNode) {
357
            createFeatureNodeSection(rootElement);
358

    
359
        } else if (input instanceof FeatureTree) {
360
            createFeatureTreeSection(rootElement);
361

    
362
        } else if (input instanceof Character) {
363
            createCharacterSection(rootElement);
364

    
365
        }else if ((input instanceof PolytomousKeyNode) || (input instanceof PolytomousKeyRelationship)) {
366
            createPolytomousKeyNodeSection(rootElement);
367
        } else if (input instanceof User) {
368
            createUserSection(rootElement);
369
        } else if (input instanceof Group) {
370
            createGroupSection(rootElement);
371
        } else if (input instanceof TaxonRelationship && ((TaxonRelationship)input).getType()!=null
372
                && (((TaxonRelationship)input).getType().isAnyMisappliedName() || ((TaxonRelationship)input).getType().isAnySynonym() || ((TaxonRelationship)input).getType().isMisappliedNameOrInvalidDesignation())){
373
            createMisappliedNameSection(rootElement);
374
        }else if (input instanceof TaxonRelationship ) {
375
            createTaxonRelationshipSection(rootElement);
376
        } else if (input instanceof TermVocabulary) {
377
            createTermVocabularySection(rootElement);
378
        } else if (input instanceof DefinedTermBase) {
379
            createDefinedTermSection(rootElement);
380

    
381
        } else if (input instanceof SelectionChangedEvent ) {
382
            IStructuredSelection sel =(IStructuredSelection) ((SelectionChangedEvent)input).getSelection();
383
            if (sel.getFirstElement()instanceof Distribution){
384
                createDescriptionElementSection(rootElement);
385
            }
386

    
387
//            createDescriptionElementSection(rootElement);
388

    
389
        }else {
390
            createEmptySection(null, rootElement);
391
        }
392
        layout();
393

    
394
    }
395

    
396
    private void createGroupSection(RootElement parent) {
397
        GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, getSectionStyle(GroupDetailSection.class));
398
        MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, getSectionStyle(MemberDetailSection.class));
399
        GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,getSectionStyle(GrantedAuthorityDetailSection.class));
400

    
401
        addPart(groupDetailSection);
402
        addPart(memberDetailSection);
403
        addPart(grantedAuthorityDetailSection);
404
    }
405

    
406
    /** {@inheritDoc} */
407
    @Override
408
    public ISelection getSelection() {
409
        return selection;
410
    }
411

    
412
    /** {@inheritDoc} */
413
    @Override
414
    public void setSelection(ISelection selection, boolean reveal) {
415

    
416
        this.selection = selection;
417

    
418
        if(this.selection!=null){
419
            SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
420
            fireSelectionChanged(selectionChangedEvent);
421
        }
422

    
423
    }
424

    
425
    private void createTaxonSections(RootElement parent) {
426
        ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
427
                getSectionStyle(ParsingMessagesSection.class, true));
428
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
429
            TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
430
                    getSectionStyle(TaxonBaseDetailSection.class, true));
431
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
432
            addPart(taxonBaseDetailSection);
433
        }else{
434
            if (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
435
                TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
436
                        getSectionStyle(TaxonBaseDetailSection.class, true));
437
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
438
                addPart(taxonBaseDetailSection);
439
            }
440
        }
441
        NonViralNameDetailSection nonViralNameSection = formFactory
442
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
443
                        getSectionStyle(NonViralNameDetailSection.class, true));
444
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
445
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
446
            NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
447
                    getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
448
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
449
            addPart(referenceDetailSection);
450

    
451
        }
452
        if ( !PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
453
            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
454
                    getSectionStyle(NomenclaturalStatusSection.class, true));
455
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
456
            addPart(nomenclaturalStatusSection);
457
        }
458

    
459
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
460
            ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, getSectionStyle(ProtologueSection.class));
461
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
462
            addPart(protologSection);
463
        }
464

    
465
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) &&  PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
466
            TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, getSectionStyle(TypeDesignationSection.class));
467
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
468
            addPart(typeDesignationSection);
469
        }
470

    
471
        if (!PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
472
            NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, getSectionStyle(NameRelationshipDetailSection.class));
473
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
474
            addPart(nameRelationshipSection);
475
        }
476

    
477

    
478
        addPart(parsingMessagesSection);
479

    
480
        addPart(nonViralNameSection);
481

    
482
    }
483

    
484
    private void createNameSections(RootElement parent) {
485
        NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
486
                getConversationHolder(), parent, this, false, getSectionStyle(NonViralNameDetailSection.class, true));
487

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

    
490
        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
491
                getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
492
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
493

    
494
        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
495
                getSectionStyle(NomenclaturalStatusSection.class, true));
496
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
497

    
498
        addPart(nonViralNameSection);
499
        addPart(nomenclaturalStatusSection);
500
        addPart(referenceDetailSection);
501

    
502
        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, getSectionStyle(ProtologueSection.class));
503
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
504

    
505
        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, getSectionStyle(TypeDesignationSection.class));
506
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
507

    
508
        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, getSectionStyle(NameRelationshipDetailSection.class));
509
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
510
        addPart(protologSection);
511
        addPart(typeDesignationSection);
512
        addPart(nameRelationshipSection);
513

    
514
    }
515

    
516
    private void createReferenceSections(RootElement parent) {
517
        ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
518
                getSectionStyle(ReferenceDetailSection.class, true));
519

    
520
        addPart(referenceDetailSection);
521
    }
522

    
523
    private void createTeamOrPersonBaseDetailSection(RootElement parent) {
524
        TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, getSectionStyle(TeamOrPersonBaseDetailSection.class, true));
525

    
526
        addPart(teamOrPersonBaseDetailSection);
527
    }
528

    
529
    private void createTeamDetailSection(RootElement parent) {
530
        TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, getSectionStyle(TeamDetailSection.class, true));
531

    
532
        addPart(teamDetailSection);
533
    }
534

    
535
    private void createPersonDetailSection(RootElement parent) {
536
        PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, getSectionStyle(PersonDetailSection.class, true));
537
        addPart(personDetailSection);
538
    }
539

    
540
    private void createDescriptionElementSection(RootElement parent) {
541
        DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionElementDetailSection.class, true));
542
        descriptionElementDetailSection.setEnabled(this.detailsEnabled);
543

    
544
        //  IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent,  getSectionStyle(.class));
545

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

    
548
        DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, getSectionStyle(DescriptionElementSourceSection.class));
549

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

    
552
        DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, getSectionStyle(DescriptionElementMediaSection.class));
553

    
554
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
555

    
556
        addPart(descriptionElementDetailSection);
557
        addPart(descriptionElementSourceSection);
558
        addPart(descriptionElementMediaSection);
559
    }
560

    
561
    private void createDescriptionSection(RootElement parent, boolean isTaxonDescription) {
562
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionDetailSection.class, true));
563
        addPart(descriptionDetailSection);
564

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

    
567
        if(isTaxonDescription) {
568
            NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(
569
                    getConversationHolder(), parent, this, getSectionStyle(NaturalLanguageSection.class, true));
570
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
571
            addPart(naturalLanguageSection);
572
        }
573
        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(
574
                getConversationHolder(), parent, getSectionStyle(DescriptionSourceSection.class, true));
575
        addPart(descriptionSourceSection);
576

    
577
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
578

    
579
        if(isTaxonDescription) {
580
            ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, getSectionStyle(ScopeSection.class));
581
            addPart(scopeSection);
582
        }
583
    }
584

    
585
    private void createTaxonDescriptionSection(RootElement parent) {
586
        createDescriptionSection(parent, true);
587
    }
588

    
589
    private void createSpecimenDescriptionSection(RootElement parent) {
590
        createDescriptionSection(parent, false);
591
    }
592

    
593
    private void createUseDescriptionSection(RootElement parent) {
594
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionDetailSection.class));
595

    
596
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
597

    
598
        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, getSectionStyle(DescriptionSourceSection.class));
599

    
600
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
601

    
602
        addPart(descriptionDetailSection);
603
        addPart(descriptionSourceSection);
604

    
605
    }
606

    
607
    private void createImageGallerySection(RootElement parent) {
608
        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionDetailSection.class));
609

    
610
        addPart(descriptionDetailSection);
611
    }
612

    
613
    private void createMediaElementSection(RootElement parent) {
614
        MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, getSectionStyle(MediaDetailsSection.class));
615

    
616
        addPart(mediaDetailSection);
617
    }
618

    
619
    private void createDerivedUnitBaseElementSection(RootElement parent) {
620
        DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(DerivedUnitGeneralDetailSection.class, true));
621
        //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
622
        if(!(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart)){
623
            derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
624
        }
625
        addPart(derivedUnitGeneralDetailSection);
626

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

    
629
        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, getSectionStyle(DerivedUnitBaseDetailSection.class, true));
630
        addPart(derivedUnitBaseDetailSection);
631

    
632
        //for editors working with facades
633
        if(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart){
634
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
635
            GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, getSectionStyle(GatheringEventDetailSection.class));
636
            addPart(gatheringEventDetailSection);
637

    
638
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
639
            FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, getSectionStyle(FieldUnitDetailSection.class));
640
            addPart(fieldUnitDetailSection);
641
        }
642
        else{
643

    
644
            if(PreferencesUtil.isShowTaxonAssociations()){
645
                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
646
                TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, getSectionStyle(TaxonAssociationDetailSection.class, true));
647
                addPart(taxonAssociationDetailSection);
648
            }
649
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
650
            DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, getSectionStyle(DerivedUnitFacadeIdentifierSection.class));
651
            addPart(identifierDetailSection);
652
        }
653
        if(!PreferencesUtil.isDeterminationOnlyForFieldUnits()){
654
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
655
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, getSectionStyle(DeterminationDetailSection.class));
656
            addPart(determinationDetailSection);
657
        }
658

    
659
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
660
        DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, getSectionStyle(DerivedUnitTypeDesignationSection.class));
661
        addPart(derivedUnitTypeDesignationSection);
662

    
663
    }
664

    
665
    private void createFieldUnitSection(RootElement parent) {
666
        FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(FieldUnitGeneralDetailSection.class, true));
667

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

    
670
        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, getSectionStyle(GatheringEventDetailSection.class));
671

    
672
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
673

    
674
        FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, getSectionStyle(FieldUnitDetailSection.class));
675

    
676
        addPart(fielUnitGeneralDetailSection);
677
        addPart(gatheringEventDetailSection);
678
        addPart(fieldUnitDetailSection);
679

    
680
        if(PreferencesUtil.isDeterminationOnlyForFieldUnits()){
681
            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
682
            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, getSectionStyle(DeterminationDetailSection.class));
683
            addPart(determinationDetailSection);
684
        }
685
    }
686

    
687
    private void createTissueSampleSection(RootElement parent) {
688
        TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(TissueSampleGeneralDetailSection.class, true));
689

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

    
692
        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, getSectionStyle(SampleDesignationDetailSection.class, true));
693

    
694
        addPart(section);
695
        addPart(sampleDesignationDetailSection);
696
    }
697

    
698
    private void createDnaSampleSection(RootElement parent) {
699
        DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(DnaSampleGeneralDetailSection.class, true));
700

    
701
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
702

    
703
        DnaSamplePreparationPreservationSection preparationPreservationSection = formFactory.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent, this, getSectionStyle(DnaSamplePreparationPreservationSection.class, true));
704

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

    
707
        DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, getSectionStyle(DnaQualityDetailSection.class, true));
708

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

    
711
        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, getSectionStyle(SampleDesignationDetailSection.class, true));
712

    
713
        addPart(section);
714
        addPart(preparationPreservationSection);
715
        addPart(qualitySection);
716
        addPart(sampleDesignationDetailSection);
717
    }
718

    
719
    private void createSequenceSection(RootElement parent) {
720
        SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(SequenceGeneralDetailSection.class, true));
721

    
722
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
723

    
724
        SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, getSectionStyle(SequenceReferenceCollectionDetailSection.class, true));
725

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

    
728
        SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, getSectionStyle(SequenceContigFileCollectionDetailSection.class, true));
729

    
730

    
731
        addPart(section);
732
        addPart(referenceSection);
733
        addPart(contigFileSection);
734
    }
735

    
736
    private void createSingleReadSection(RootElement parent) {
737
        SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(SingleReadGeneralDetailSection.class, true));
738
        addPart(section);
739

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

    
742
        SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, getSectionStyle(SingleReadPherogramCollectionDetailSection.class, true));
743
        addPart(pherogramSection);
744

    
745
    }
746

    
747
    private void createMediaSpecimenSection(RootElement parent) {
748
        MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(MediaSpecimenGeneralDetailSection.class, true));
749
        addPart(generalSection);
750

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

    
753
        RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, getSectionStyle(RightsSection.class));
754
        addPart(rightsSection);
755

    
756
    }
757

    
758
    private void createFeatureTreeSection(RootElement parent) {
759
        FeatureTreeDetailSection section = formFactory.createFeatureTreeDetailSection(getConversationHolder(), parent, this, getSectionStyle(FeatureTreeDetailSection.class, true));
760

    
761
        addPart(section);
762
    }
763

    
764
    private void createFeatureNodeSection(RootElement parent) {
765
        FeatureNodeDetailSection featureDistributionSection = formFactory.createFeatureNodeDetailSection(getConversationHolder(), parent, this, getSectionStyle(FeatureNodeDetailSection.class, true));
766

    
767
        addPart(featureDistributionSection);
768
    }
769

    
770
    private void createFeatureDistributionSection(RootElement parent) {
771
        FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, getSectionStyle(FeatureDistributionDetailSection.class, true));
772

    
773
        addPart(featureDistributionSection);
774
    }
775

    
776
    private void createCharacterSection(RootElement parent) {
777
        CharacterDetailSection featureDistributionSection = formFactory.createCharacterDetailSection(getConversationHolder(), parent, this, getSectionStyle(CharacterDetailSection.class, true));
778

    
779
        addPart(featureDistributionSection);
780
    }
781

    
782
    private void createPolytomousKeyNodeSection(RootElement parent) {
783
        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, getSectionStyle(PolytomousKeyDetailSection.class));
784

    
785
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
786

    
787
        PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, getSectionStyle(PolytomousKeyNodeDetailSection.class, true));
788

    
789
        addPart(polytomousKeyDetailSection);
790
        addPart(polytomousKeyNodeDetailSection);
791

    
792
    }
793

    
794
    private void createUseRecordSection(RootElement parent) {
795
        UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,getSectionStyle(UseRecordDetailSection.class, true));
796

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

    
799
        addPart(descriptionUseRecordSection);
800

    
801

    
802
    }
803

    
804
    private void createUserSection(RootElement parent) {
805
        UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, getSectionStyle(UserDetailSection.class, true));
806

    
807
        GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, getSectionStyle(GroupsByUserDetailSection.class, true));
808

    
809
        addPart(userDetailSection);
810
        addPart(groupByUserDetailSection);
811
    }
812

    
813
    private void createMisappliedNameSection(RootElement parent) {
814
        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this,
815
                getSectionStyle(TaxonRelationshipDetailSection.class, true));
816
        addPart(taxonRelationshipDetailSection);
817

    
818
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
819

    
820

    
821
        NonViralNameDetailSection nonViralNameSection = formFactory
822
                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
823
                        getSectionStyle(NonViralNameDetailSection.class, true));
824
        addPart(nonViralNameSection);
825

    
826
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
827

    
828
        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
829
                getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
830
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
831
        addPart(referenceDetailSection);
832

    
833

    
834
        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
835
            		getSectionStyle(NomenclaturalStatusSection.class, true));
836
        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
837
        addPart(nomenclaturalStatusSection);
838

    
839
		ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, getSectionStyle(ProtologueSection.class));
840
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
841
		addPart(protologSection);
842

    
843
		TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, getSectionStyle(TypeDesignationSection.class));
844
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
845
		addPart(typeDesignationSection);
846

    
847
		NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, getSectionStyle(NameRelationshipDetailSection.class));
848
		formFactory.createHorizontalSeparator(parent, SWT.BORDER);
849
		addPart(nameRelationshipSection);
850

    
851
    }
852

    
853
    private void createTaxonRelationshipSection(RootElement parent) {
854
        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, getSectionStyle(TaxonRelationshipDetailSection.class, true));
855

    
856
        ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, getSectionStyle(ReferencedEntityDetailSection.class, true));
857
        addPart(taxonRelationshipDetailSection);
858
        addPart(referencedEntityBaseDetailSection);
859
    }
860
    private void createTermVocabularySection(RootElement parent) {
861
        TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, getSectionStyle(TermVocabularyDetailSection.class, true));
862
        addPart(termVocabularyDetailSection);
863
    }
864

    
865
    private void createDefinedTermSection(RootElement parent) {
866
        DefinedTermDetailSection definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, getSectionStyle(DefinedTermDetailSection.class, true));
867
        addPart(definedTermDetailSection);
868
    }
869

    
870
    @Override
871
    public void update(CdmDataChangeMap arg0) {
872

    
873
    }
874
    @Inject
875
    @Optional
876
    private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_TAXON_DETAILS)boolean refresh){
877
        if(refresh){
878
            refresh();
879

    
880
//            setSelection(getSelection(), true);
881
        }
882
    }
883
}
(2-2/2)