2 * Copyright (C) 2011 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.view
.detail
;
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
;
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
.model
.taxon
.TaxonRelationshipType
;
50 import eu
.etaxonomy
.cdm
.persistence
.hibernate
.CdmDataChangeMap
;
51 import eu
.etaxonomy
.taxeditor
.model
.AbstractUtility
;
52 import eu
.etaxonomy
.taxeditor
.model
.FeatureNodeContainer
;
53 import eu
.etaxonomy
.taxeditor
.model
.IDerivedUnitFacadePart
;
54 import eu
.etaxonomy
.taxeditor
.model
.MessagingUtils
;
55 import eu
.etaxonomy
.taxeditor
.model
.PolytomousKeyRelationship
;
56 import eu
.etaxonomy
.taxeditor
.preference
.IPreferenceKeys
;
57 import eu
.etaxonomy
.taxeditor
.preference
.PreferencesUtil
;
58 import eu
.etaxonomy
.taxeditor
.store
.UsageTermCollection
;
59 import eu
.etaxonomy
.taxeditor
.ui
.element
.AbstractFormSection
;
60 import eu
.etaxonomy
.taxeditor
.ui
.element
.RootElement
;
61 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.PersonDetailSection
;
62 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamDetailSection
;
63 import eu
.etaxonomy
.taxeditor
.ui
.section
.agent
.TeamOrPersonBaseDetailSection
;
64 import eu
.etaxonomy
.taxeditor
.ui
.section
.common
.ReferencedEntityDetailSection
;
65 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionDetailSection
;
66 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementDetailSection
;
67 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementMediaSection
;
68 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionElementSourceSection
;
69 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.DescriptionSourceSection
;
71 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.MediaDetailsSection
;
72 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.NaturalLanguageSection
;
73 import eu
.etaxonomy
.taxeditor
.ui
.section
.description
.ScopeSection
;
74 import eu
.etaxonomy
.taxeditor
.ui
.section
.feature
.FeatureDistributionDetailSection
;
75 import eu
.etaxonomy
.taxeditor
.ui
.section
.grantedAuthority
.GrantedAuthorityDetailSection
;
76 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.GroupDetailSection
;
77 import eu
.etaxonomy
.taxeditor
.ui
.section
.group
.MemberDetailSection
;
78 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyDetailSection
;
79 import eu
.etaxonomy
.taxeditor
.ui
.section
.key
.PolytomousKeyNodeDetailSection
;
80 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NameRelationshipDetailSection
;
81 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NomenclaturalStatusSection
;
82 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.NonViralNameDetailSection
;
83 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.ProtologueSection
;
84 import eu
.etaxonomy
.taxeditor
.ui
.section
.name
.TypeDesignationSection
;
85 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitBaseDetailSection
;
86 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DerivedUnitGeneralDetailSection
;
87 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.DeterminationDetailSection
;
88 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.EmptySection
;
89 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitDetailSection
;
90 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.FieldUnitGeneralDetailSection
;
91 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.GatheringEventDetailSection
;
92 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.DerivedUnitTypeDesignationSection
;
93 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.association
.TaxonAssociationDetailSection
;
94 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaQualityDetailSection
;
95 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSampleGeneralDetailSection
;
96 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.DnaSamplePreparationPreservationSection
;
97 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SampleDesignationDetailSection
;
98 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceContigFileCollectionDetailSection
;
99 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceGeneralDetailSection
;
100 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SequenceReferenceCollectionDetailSection
;
101 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadGeneralDetailSection
;
102 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.SingleReadPherogramCollectionDetailSection
;
103 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.dna
.TissueSampleGeneralDetailSection
;
104 import eu
.etaxonomy
.taxeditor
.ui
.section
.occurrence
.media
.MediaSpecimenGeneralDetailSection
;
105 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.NomenclaturalReferenceDetailSection
;
106 import eu
.etaxonomy
.taxeditor
.ui
.section
.reference
.ReferenceDetailSection
;
107 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.RightsSection
;
108 import eu
.etaxonomy
.taxeditor
.ui
.section
.supplemental
.identifier
.DerivedUnitFacadeIdentifierSection
;
109 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.ParsingMessagesSection
;
110 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonBaseDetailSection
;
111 import eu
.etaxonomy
.taxeditor
.ui
.section
.taxon
.TaxonRelationshipDetailSection
;
112 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.GroupsByUserDetailSection
;
113 import eu
.etaxonomy
.taxeditor
.ui
.section
.user
.UserDetailSection
;
114 import eu
.etaxonomy
.taxeditor
.ui
.section
.userecords
.UseRecordDetailSection
;
115 import eu
.etaxonomy
.taxeditor
.ui
.section
.vocabulary
.TermVocabularyDetailSection
;
116 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmDataViewer
;
117 import eu
.etaxonomy
.taxeditor
.view
.AbstractCdmViewPart
;
121 * The DetailsViewer handles the content of the details view (
122 * {@link DetailsViewPart}).<br>
123 * Depending on the type of the selected element the section of the details view
127 * @created Feb 12, 2010
130 public class DetailsViewer
extends AbstractCdmDataViewer
{
132 private ISelection selection
;
134 public DetailsViewer(Composite parent
, AbstractCdmViewPart viewPart
) {
135 super(parent
, viewPart
);
138 // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
139 // since we are getting implementations of DerivedUnitBase from the bulk
141 // and not derived unit facade objects,
144 public void setInput(Object input
) {
146 if(input
instanceof TreeNode
){
147 input
= ((TreeNode
) input
).getValue();
149 if(input
instanceof GbifResponse
){
150 input
= ((GbifResponse
) input
).getDerivedUnitFacade();
152 if (input
.getClass().equals(DerivedUnit
.class)) {
153 DerivedUnit derivedUnit
= (DerivedUnit
)input
;
155 input
= DerivedUnitFacade
.NewInstance(derivedUnit
,
156 PreferencesUtil
.getDerivedUnitConfigurator());
157 } catch (DerivedUnitFacadeNotSupportedException e
) {
158 // 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
161 else if(input
instanceof FieldUnit
){
162 input
= DerivedUnitFacade
.NewInstance(SpecimenOrObservationType
.FieldUnit
, (FieldUnit
) input
);
164 super.setInput(input
);
168 protected void markViewPartDirty() {
169 if (getInput() instanceof DerivedUnitFacade
) {
170 DerivedUnitFacade facade
= (DerivedUnitFacade
) getInput();
171 if(facade
.innerDerivedUnit()!=null){
172 getViewPart().changed(facade
.innerDerivedUnit());
174 else if(facade
.innerFieldUnit()!=null){
175 getViewPart().changed(facade
.innerFieldUnit());
179 super.markViewPartDirty();
183 // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
188 protected void showParts() {
189 // FIXME (CM) : Need to clean out this code.
190 // Too much type checking to decide which detail view to display.
191 // Need to build in a mechanism where navigators / editors are 'aware'
192 // of the corresponding detail viewer.
194 Object input
= getInput();
197 if (input
instanceof TaxonBase
) {
198 if(((TaxonBase
) input
).getName()==null){
199 createEmptySection(rootElement
);
202 createTaxonSections(rootElement
);
205 } else if (input
instanceof TaxonName
) {
206 createNameSections(rootElement
);
208 } else if (input
instanceof Reference
) {
209 createReferenceSections(rootElement
);
211 } else if (input
instanceof Team
) {
212 createTeamDetailSection(rootElement
);
214 } else if (input
instanceof Person
) {
215 createPersonDetailSection(rootElement
);
217 } else if (input
instanceof TeamOrPersonBase
) {
218 createTeamOrPersonBaseDetailSection(rootElement
);
220 } else if (input
instanceof DescriptionBase
) {
221 if(input
instanceof SpecimenDescription
){
222 //TODO: add more sections to DetailsView for SpecimenDescription
223 createSpecimenDescriptionSection(rootElement
);
226 Set
<Marker
> descriptionMarkers
= ((DescriptionBase
<?
>) input
).getMarkers();
228 Boolean isUseDescription
= false;
229 for (Marker marker
: descriptionMarkers
) {
230 if (marker
.getMarkerType()!= null && marker
.getMarkerType().getUuid().equals(UsageTermCollection
.uuidUseMarkerType
)) {
231 isUseDescription
= true;
234 if (((DescriptionBase
<?
>) input
).isImageGallery()) {
235 createImageGallerySection(rootElement
);
237 } else if (isUseDescription
) {
238 createUseDescriptionSection(rootElement
);
240 createDescriptionSection(rootElement
);
244 } else if (input
instanceof DescriptionElementBase
) {
245 Set
<Marker
> descriptionMarkers
= ((DescriptionElementBase
) input
).getInDescription().getMarkers();
247 Boolean isUseDescription
= false;
248 for (Marker marker
: descriptionMarkers
) {
249 if (marker
.getMarkerType()!= null && marker
.getMarkerType().getUuid().equals(UsageTermCollection
.uuidUseMarkerType
)) {
250 isUseDescription
= true;
254 if (isUseDescription
== true && input
instanceof CategoricalData
) {
255 createUseRecordSection(rootElement
);
257 createDescriptionElementSection(rootElement
);
260 } else if (input
instanceof Media
) {
261 createMediaElementSection(rootElement
);
263 } else if (input
instanceof DerivedUnitFacade
) {
264 if(((DerivedUnitFacade
) input
).getType()==SpecimenOrObservationType
.FieldUnit
){
265 if(((DerivedUnitFacade
) input
).innerFieldUnit()==null){
266 MessagingUtils
.error(DetailsViewer
.class, "FieldUnit of facade is null", null);
269 createFieldUnitSection(rootElement
);
272 else if(((DerivedUnitFacade
) input
).getType()==SpecimenOrObservationType
.PreservedSpecimen
){
273 if(((DerivedUnitFacade
) input
).innerDerivedUnit()==null){
274 MessagingUtils
.error(DetailsViewer
.class, "DerivedUnit of facade is null", null);
277 createDerivedUnitBaseElementSection(rootElement
);
280 else if(((DerivedUnitFacade
) input
).getType()==SpecimenOrObservationType
.TissueSample
){
281 //TissueSample should only be created by using it's own class
282 //in future using only one class with different SpecimenOrObservationTypes is desired
283 createTissueSampleSection(rootElement
);
286 createDerivedUnitBaseElementSection(rootElement
);
288 } else if (input
instanceof DnaSample
){
289 DnaSample dnaSample
= (DnaSample
)input
;
290 if(dnaSample
.getRecordBasis()==SpecimenOrObservationType
.TissueSample
){
291 createTissueSampleSection(rootElement
);
293 else if(dnaSample
.getRecordBasis()==SpecimenOrObservationType
.DnaSample
){
294 createDnaSampleSection(rootElement
);
296 } else if (input
instanceof MediaSpecimen
){
297 createMediaSpecimenSection(rootElement
);
299 else if(input
instanceof Sequence
){
300 createSequenceSection(rootElement
);
302 else if(input
instanceof SingleRead
){
303 createSingleReadSection(rootElement
);
305 else if (input
instanceof FeatureNodeContainer
) {
306 createFeatureDistributionSection(rootElement
);
308 }else if ((input
instanceof PolytomousKeyNode
) || (input
instanceof PolytomousKeyRelationship
)) {
309 createPolytomousKeyNodeSection(rootElement
);
310 } else if (input
instanceof User
) {
311 createUserSection(rootElement
);
312 } else if (input
instanceof Group
) {
313 createGroupSection(rootElement
);
314 } else if (input
instanceof TaxonRelationship
&& ((TaxonRelationship
)input
).getType().equals(TaxonRelationshipType
.MISAPPLIED_NAME_FOR())) {
315 createMisappliedNameSection(rootElement
);
316 }else if (input
instanceof TaxonRelationship
) {
317 createTaxonRelationshipSection(rootElement
);
318 } else if (input
instanceof TermVocabulary
) {
319 createTermVocabularySection(rootElement
);
320 } else if (input
instanceof DefinedTermBase
) {
321 createDefinedTermSection(rootElement
);
324 createEmptySection(rootElement
);
331 private void createEmptySection(RootElement parent
) {
334 EmptySection emptySection
= formFactory
.createEmptySection(formFactory
, parent
, SWT
.NONE
);
336 addPart(emptySection
);
339 private void createGroupSection(RootElement parent
) {
342 GroupDetailSection groupDetailSection
= formFactory
.createGroupDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
343 MemberDetailSection memberDetailSection
= formFactory
.createMemberDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
344 GrantedAuthorityDetailSection grantedAuthorityDetailSection
= formFactory
.createGrantedAuthorityDetailSection(getConversationHolder(), parent
,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
346 addPart(groupDetailSection
);
347 addPart(memberDetailSection
);
348 addPart(grantedAuthorityDetailSection
);
353 public ISelection
getSelection() {
359 public void setSelection(ISelection selection
, boolean reveal
) {
361 this.selection
= selection
;
363 if(this.selection
!=null){
364 SelectionChangedEvent selectionChangedEvent
= new SelectionChangedEvent(this, selection
);
365 fireSelectionChanged(selectionChangedEvent
);
370 private void createTaxonSections(RootElement parent
) {
373 ParsingMessagesSection parsingMessagesSection
= formFactory
.createParsingMessagesSection(getConversationHolder(), parent
, this,
374 ExpandableComposite
.EXPANDED
| ExpandableComposite
.EXPANDED
);
375 if (!PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_SIMPLE_NAME_DETAILS_SECTION
)){
376 TaxonBaseDetailSection taxonBaseDetailSection
= formFactory
.createTaxonBaseDetailSection(getConversationHolder(), parent
, this,
377 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
378 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
379 addPart(taxonBaseDetailSection
);
381 if (PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_SIMPLE_NAME_DETAILS_TAXON
)){
382 TaxonBaseDetailSection taxonBaseDetailSection
= formFactory
.createTaxonBaseDetailSection(getConversationHolder(), parent
, this,
383 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
384 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
386 addPart(taxonBaseDetailSection
);
389 NonViralNameDetailSection nonViralNameSection
= formFactory
390 .createNonViralNameDetailSection(getConversationHolder(), parent
, this, true,
391 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
392 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
393 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
))){
394 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this,
395 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
396 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
397 addPart(referenceDetailSection
);
400 if ( !PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_SIMPLE_NAME_DETAILS_SECTION
) || (PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_SIMPLE_NAME_DETAILS_SECTION
) && PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS
))){
401 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
,
402 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
403 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
404 addPart(nomenclaturalStatusSection
);
407 if (!PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_SIMPLE_NAME_DETAILS_SECTION
) || (PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_SIMPLE_NAME_DETAILS_SECTION
) && PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE
))){
408 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
409 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
410 addPart(protologSection
);
413 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
))){
414 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
415 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
416 addPart(typeDesignationSection
);
419 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
))){
420 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
421 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
422 addPart(nameRelationshipSection
);
426 addPart(parsingMessagesSection
);
428 addPart(nonViralNameSection
);
432 private void createNameSections(RootElement parent
) {
434 NonViralNameDetailSection nonViralNameSection
= formFactory
.createNonViralNameDetailSection(
435 getConversationHolder(), parent
, this, false, ExpandableComposite
.TWISTIE
436 | ExpandableComposite
.EXPANDED
);
437 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
439 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this,
440 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
441 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
443 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
,
444 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
445 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
447 addPart(nonViralNameSection
);
448 addPart(nomenclaturalStatusSection
);
449 addPart(referenceDetailSection
);
451 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
452 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
454 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
455 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
457 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
458 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
459 addPart(protologSection
);
460 addPart(typeDesignationSection
);
461 addPart(nameRelationshipSection
);
465 private void createReferenceSections(RootElement parent
) {
468 ReferenceDetailSection referenceDetailSection
= formFactory
.createReferenceDetailSection(getConversationHolder(), parent
, this,
469 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
471 addPart(referenceDetailSection
);
474 private void createTeamOrPersonBaseDetailSection(RootElement parent
) {
476 TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection
= formFactory
.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
478 addPart(teamOrPersonBaseDetailSection
);
481 private void createTeamDetailSection(RootElement parent
) {
483 TeamDetailSection teamDetailSection
= formFactory
.createTeamDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
485 addPart(teamDetailSection
);
488 private void createPersonDetailSection(RootElement parent
) {
490 PersonDetailSection personDetailSection
= formFactory
.createPersonDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
491 addPart(personDetailSection
);
494 private void createDescriptionElementSection(RootElement parent
) {
497 DescriptionElementDetailSection descriptionElementDetailSection
= formFactory
.createDescriptionElementDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
499 // IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
501 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
503 DescriptionElementSourceSection descriptionElementSourceSection
= formFactory
.createDescriptionElementSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
505 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
507 DescriptionElementMediaSection descriptionElementMediaSection
= formFactory
.createDescriptionElementMediaSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
509 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
511 addPart(descriptionElementDetailSection
);
512 addPart(descriptionElementSourceSection
);
513 addPart(descriptionElementMediaSection
);
516 private void createDescriptionSection(RootElement parent
) {
518 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
520 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
522 NaturalLanguageSection naturalLanguageSection
= formFactory
.createNaturalLanguageSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
524 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
526 // DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
528 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
530 // DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
531 // .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
532 // getConversationHolder(), parent, Section.TWISTIE);
534 // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
536 ScopeSection scopeSection
= formFactory
.createScopeSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
538 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
540 addPart(descriptionDetailSection
);
541 addPart(naturalLanguageSection
);
542 // addPart(describedSpecimenSection);
543 // addPart(descriptionSourceSection);
544 addPart(scopeSection
);
547 private void createSpecimenDescriptionSection(RootElement parent
) {
549 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
550 addPart(descriptionDetailSection
);
553 private void createUseDescriptionSection(RootElement parent
) {
555 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
557 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
559 DescriptionSourceSection descriptionSourceSection
= formFactory
.createDescriptionSourceSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
561 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
563 addPart(descriptionDetailSection
);
564 addPart(descriptionSourceSection
);
568 private void createImageGallerySection(RootElement parent
) {
570 DescriptionDetailSection descriptionDetailSection
= formFactory
.createDescriptionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
572 addPart(descriptionDetailSection
);
575 private void createMediaElementSection(RootElement parent
) {
578 MediaDetailsSection mediaDetailSection
= formFactory
.createMediaDetailsSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
580 addPart(mediaDetailSection
);
583 private void createDerivedUnitBaseElementSection(RootElement parent
) {
586 DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection
= formFactory
.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
587 //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
588 if(!(AbstractUtility
.getActiveE4Part() instanceof IDerivedUnitFacadePart
)){
589 derivedUnitGeneralDetailSection
.setShowOnlyDerivedUnitData(true);
591 addPart(derivedUnitGeneralDetailSection
);
593 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
595 DerivedUnitBaseDetailSection derivedUnitBaseDetailSection
= formFactory
.createDerivedUnitBaseDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
596 addPart(derivedUnitBaseDetailSection
);
598 //for editors working with facades
599 if(AbstractUtility
.getActiveE4Part() instanceof IDerivedUnitFacadePart
){
600 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
601 GatheringEventDetailSection gatheringEventDetailSection
= formFactory
.createGatheringEventDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
602 addPart(gatheringEventDetailSection
);
604 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
605 FieldUnitDetailSection fieldUnitDetailSection
= formFactory
.createFieldUnitDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
606 addPart(fieldUnitDetailSection
);
610 if(PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.SHOW_TAXON_ASSOCIATIONS
)){
611 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
612 TaxonAssociationDetailSection taxonAssociationDetailSection
= formFactory
.createTaxonAssociationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
613 addPart(taxonAssociationDetailSection
);
615 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
616 DerivedUnitFacadeIdentifierSection identifierDetailSection
= formFactory
.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
617 addPart(identifierDetailSection
);
619 if(!PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.DETERMINATION_ONLY_FOR_FIELD_UNITS
)){
620 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
621 DeterminationDetailSection determinationDetailSection
= formFactory
.createDeterminationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
622 addPart(determinationDetailSection
);
625 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
626 DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection
= formFactory
.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
627 addPart(derivedUnitTypeDesignationSection
);
631 private void createFieldUnitSection(RootElement parent
) {
634 FieldUnitGeneralDetailSection fielUnitGeneralDetailSection
= formFactory
.createFieldUnitGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
636 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
638 GatheringEventDetailSection gatheringEventDetailSection
= formFactory
.createGatheringEventDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
640 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
642 FieldUnitDetailSection fieldUnitDetailSection
= formFactory
.createFieldUnitDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
644 addPart(fielUnitGeneralDetailSection
);
645 addPart(gatheringEventDetailSection
);
646 addPart(fieldUnitDetailSection
);
648 if(PreferencesUtil
.getPreferenceStore().getBoolean(IPreferenceKeys
.DETERMINATION_ONLY_FOR_FIELD_UNITS
)){
649 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
650 DeterminationDetailSection determinationDetailSection
= formFactory
.createDeterminationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
651 addPart(determinationDetailSection
);
655 private void createTissueSampleSection(RootElement parent
) {
658 TissueSampleGeneralDetailSection section
= formFactory
.createTissueSampleGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
660 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
662 SampleDesignationDetailSection sampleDesignationDetailSection
= formFactory
.createSampleDesignationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
665 addPart(sampleDesignationDetailSection
);
668 private void createDnaSampleSection(RootElement parent
) {
671 DnaSampleGeneralDetailSection section
= formFactory
.createDnaSampleGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
673 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
675 DnaSamplePreparationPreservationSection preparationPreservationSection
= formFactory
.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
677 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
679 DnaQualityDetailSection qualitySection
= formFactory
.createDnaQualityDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
681 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
683 SampleDesignationDetailSection sampleDesignationDetailSection
= formFactory
.createSampleDesignationDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
686 addPart(preparationPreservationSection
);
687 addPart(qualitySection
);
688 addPart(sampleDesignationDetailSection
);
691 private void createSequenceSection(RootElement parent
) {
694 SequenceGeneralDetailSection section
= formFactory
.createSequenceGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
696 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
698 SequenceReferenceCollectionDetailSection referenceSection
= formFactory
.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
700 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
702 SequenceContigFileCollectionDetailSection contigFileSection
= formFactory
.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
706 addPart(referenceSection
);
707 addPart(contigFileSection
);
710 private void createSingleReadSection(RootElement parent
) {
713 SingleReadGeneralDetailSection section
= formFactory
.createSingleReadGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
716 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
718 SingleReadPherogramCollectionDetailSection pherogramSection
= formFactory
.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
719 addPart(pherogramSection
);
723 private void createMediaSpecimenSection(RootElement parent
) {
726 MediaSpecimenGeneralDetailSection generalSection
= formFactory
.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
727 addPart(generalSection
);
729 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
731 RightsSection rightsSection
= formFactory
.createRightsSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
732 addPart(rightsSection
);
736 private void createFeatureDistributionSection(RootElement parent
) {
739 FeatureDistributionDetailSection featureDistributionSection
= formFactory
.createFeatureDistributionDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
741 addPart(featureDistributionSection
);
744 private void createPolytomousKeyNodeSection(RootElement parent
) {
747 PolytomousKeyDetailSection polytomousKeyDetailSection
= formFactory
.createPolytomousKeyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
);
749 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
751 PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection
= formFactory
.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
753 addPart(polytomousKeyDetailSection
);
754 addPart(polytomousKeyNodeDetailSection
);
758 private void createUseRecordSection(RootElement parent
) {
761 UseRecordDetailSection descriptionUseRecordSection
= formFactory
.createUseRecordDetailSection(getConversationHolder(), parent
, this,ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
763 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
765 addPart(descriptionUseRecordSection
);
770 private void createUserSection(RootElement parent
) {
773 UserDetailSection userDetailSection
= formFactory
.createUserDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
775 GroupsByUserDetailSection groupByUserDetailSection
= formFactory
.createGroupsByUserDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
777 addPart(userDetailSection
);
778 addPart(groupByUserDetailSection
);
781 private void createMisappliedNameSection(RootElement parent
) {
784 TaxonRelationshipDetailSection taxonRelationshipDetailSection
= formFactory
.createTaxonRelationshipDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
786 // ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
787 addPart(taxonRelationshipDetailSection
);
788 //addPart(referencedEntityBaseDetailSection);
790 NonViralNameDetailSection nonViralNameSection
= formFactory
791 .createNonViralNameDetailSection(getConversationHolder(), parent
, this, true,
792 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
793 addPart(nonViralNameSection
);
794 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
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_NOMENCLATURAL_REFERENCE))){
796 NomenclaturalReferenceDetailSection referenceDetailSection
= formFactory
.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent
, this,
797 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
798 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
799 addPart(referenceDetailSection
);
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_NOMENCLATURAL_STATUS))){
802 NomenclaturalStatusSection nomenclaturalStatusSection
= formFactory
.createNomenclaturalStatusSection(getConversationHolder(), parent
,
803 ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
804 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
805 addPart(nomenclaturalStatusSection
);
808 //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))){
809 ProtologueSection protologSection
= formFactory
.createProtologueSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
810 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
811 addPart(protologSection
);
814 //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))){
815 TypeDesignationSection typeDesignationSection
= formFactory
.createTypeDesignationSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
816 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
817 addPart(typeDesignationSection
);
820 //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))){
821 NameRelationshipDetailSection nameRelationshipSection
= formFactory
.createNameRelationshipDetailSection(getConversationHolder(), parent
, ExpandableComposite
.TWISTIE
);
822 formFactory
.createHorizontalSeparator(parent
, SWT
.BORDER
);
823 addPart(nameRelationshipSection
);
830 private void createTaxonRelationshipSection(RootElement parent
) {
833 TaxonRelationshipDetailSection taxonRelationshipDetailSection
= formFactory
.createTaxonRelationshipDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
835 ReferencedEntityDetailSection referencedEntityBaseDetailSection
= formFactory
.createReferencedEntityDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
836 addPart(taxonRelationshipDetailSection
);
837 addPart(referencedEntityBaseDetailSection
);
839 private void createTermVocabularySection(RootElement parent
) {
842 TermVocabularyDetailSection termVocabularyDetailSection
= formFactory
.createTermVocabularyDetailSection(getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
843 addPart(termVocabularyDetailSection
);
846 private void createDefinedTermSection(RootElement parent
) {
849 AbstractFormSection
<?
> definedTermDetailSection
= formFactory
.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent
, this, ExpandableComposite
.TWISTIE
| ExpandableComposite
.EXPANDED
);
850 addPart(definedTermDetailSection
);
854 public void update(CdmDataChangeMap arg0
) {