1 |
|
/**
|
2 |
|
* Copyright (C) 2011 EDIT
|
3 |
|
* European Distributed Institute of Taxonomy
|
4 |
|
* http://www.e-taxonomy.eu
|
5 |
|
*
|
6 |
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7 |
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8 |
|
*/
|
9 |
|
|
10 |
|
package eu.etaxonomy.taxeditor.view.detail;
|
11 |
|
|
12 |
|
import java.util.Set;
|
13 |
|
|
14 |
|
import org.eclipse.jface.viewers.ISelection;
|
15 |
|
import org.eclipse.jface.viewers.SelectionChangedEvent;
|
16 |
|
import org.eclipse.jface.viewers.TreeNode;
|
17 |
|
import org.eclipse.swt.SWT;
|
18 |
|
import org.eclipse.swt.widgets.Composite;
|
19 |
|
import org.eclipse.ui.forms.widgets.ExpandableComposite;
|
20 |
|
|
21 |
|
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
|
22 |
|
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
|
23 |
|
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
|
24 |
|
import eu.etaxonomy.cdm.model.agent.Person;
|
25 |
|
import eu.etaxonomy.cdm.model.agent.Team;
|
26 |
|
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
|
27 |
|
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
28 |
|
import eu.etaxonomy.cdm.model.common.Group;
|
29 |
|
import eu.etaxonomy.cdm.model.common.Marker;
|
30 |
|
import eu.etaxonomy.cdm.model.common.TermVocabulary;
|
31 |
|
import eu.etaxonomy.cdm.model.common.User;
|
32 |
|
import eu.etaxonomy.cdm.model.description.CategoricalData;
|
33 |
|
import eu.etaxonomy.cdm.model.description.DescriptionBase;
|
34 |
|
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
|
35 |
|
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
|
36 |
|
import eu.etaxonomy.cdm.model.description.SpecimenDescription;
|
37 |
|
import eu.etaxonomy.cdm.model.media.Media;
|
38 |
|
import eu.etaxonomy.cdm.model.molecular.DnaSample;
|
39 |
|
import eu.etaxonomy.cdm.model.molecular.Sequence;
|
40 |
|
import eu.etaxonomy.cdm.model.molecular.SingleRead;
|
41 |
|
import eu.etaxonomy.cdm.model.name.TaxonName;
|
42 |
|
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
|
43 |
|
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
|
44 |
|
import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
|
45 |
|
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
|
46 |
|
import eu.etaxonomy.cdm.model.reference.Reference;
|
47 |
|
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
|
48 |
|
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
|
49 |
|
import eu.etaxonomy.cdm.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;
|
70 |
|
import eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection;
|
71 |
|
import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageSection;
|
72 |
|
import eu.etaxonomy.taxeditor.ui.section.description.ScopeSection;
|
73 |
|
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSection;
|
74 |
|
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
|
75 |
|
import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
|
76 |
|
import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
|
77 |
|
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
|
78 |
|
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
|
79 |
|
import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
|
80 |
|
import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
|
81 |
|
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
|
82 |
|
import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
|
83 |
|
import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
|
84 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
|
85 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
|
86 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
|
87 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.EmptySection;
|
88 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
|
89 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
|
90 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
|
91 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.DerivedUnitTypeDesignationSection;
|
92 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailSection;
|
93 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
|
94 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
|
95 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSamplePreparationPreservationSection;
|
96 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailSection;
|
97 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceContigFileCollectionDetailSection;
|
98 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailSection;
|
99 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceReferenceCollectionDetailSection;
|
100 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadGeneralDetailSection;
|
101 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadPherogramCollectionDetailSection;
|
102 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailSection;
|
103 |
|
import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailSection;
|
104 |
|
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
|
105 |
|
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
|
106 |
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
|
107 |
|
import eu.etaxonomy.taxeditor.ui.section.supplemental.identifier.DerivedUnitFacadeIdentifierSection;
|
108 |
|
import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
|
109 |
|
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
|
110 |
|
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
|
111 |
|
import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
|
112 |
|
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
|
113 |
|
import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
|
114 |
|
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
|
115 |
|
import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer;
|
116 |
|
import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
|
117 |
|
|
118 |
|
/**
|
119 |
|
*
|
120 |
|
* The DetailsViewer handles the content of the details view (
|
121 |
|
* {@link DetailsViewPart}).<br>
|
122 |
|
* Depending on the type of the selected element the section of the details view
|
123 |
|
* are created.
|
124 |
|
*
|
125 |
|
* @author n.hoffmann
|
126 |
|
* @created Feb 12, 2010
|
127 |
|
* @version 1.0
|
128 |
|
*/
|
129 |
|
public class DetailsViewer extends AbstractCdmDataViewer {
|
130 |
|
|
131 |
|
private ISelection selection;
|
132 |
|
|
133 |
|
public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
|
134 |
|
super(parent, viewPart);
|
135 |
|
}
|
136 |
|
|
137 |
|
// START HACK TO MAKE THE DERIVED UNIT FACADE WORK
|
138 |
|
// since we are getting implementations of DerivedUnitBase from the bulk
|
139 |
|
// editor
|
140 |
|
// and not derived unit facade objects,
|
141 |
|
|
142 |
|
@Override
|
143 |
|
public void setInput(Object input) {
|
144 |
|
|
145 |
|
if(input instanceof TreeNode){
|
146 |
|
input = ((TreeNode) input).getValue();
|
147 |
|
}
|
148 |
|
if(input instanceof GbifResponse){
|
149 |
|
input = ((GbifResponse) input).getDerivedUnitFacade();
|
150 |
|
}
|
151 |
|
if (input.getClass().equals(DerivedUnit.class)) {
|
152 |
|
DerivedUnit derivedUnit = (DerivedUnit)input;
|
153 |
|
try {
|
154 |
|
input = DerivedUnitFacade.NewInstance(derivedUnit,
|
155 |
|
PreferencesUtil.getDerivedUnitConfigurator());
|
156 |
|
} catch (DerivedUnitFacadeNotSupportedException e) {
|
157 |
|
// 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
|
158 |
|
}
|
159 |
|
}
|
160 |
|
else if(input instanceof FieldUnit){
|
161 |
|
input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
|
162 |
|
}
|
163 |
|
super.setInput(input);
|
164 |
|
}
|
165 |
|
|
166 |
|
@Override
|
167 |
|
protected void markViewPartDirty() {
|
168 |
|
if (getInput() instanceof DerivedUnitFacade) {
|
169 |
|
DerivedUnitFacade facade = (DerivedUnitFacade) getInput();
|
170 |
|
if(facade.innerDerivedUnit()!=null){
|
171 |
|
getViewPart().changed(facade.innerDerivedUnit());
|
172 |
|
}
|
173 |
|
else if(facade.innerFieldUnit()!=null){
|
174 |
|
getViewPart().changed(facade.innerFieldUnit());
|
175 |
|
}
|
176 |
|
}
|
177 |
|
else{
|
178 |
|
super.markViewPartDirty();
|
179 |
|
}
|
180 |
|
}
|
181 |
|
|
182 |
|
// END HACK TO MAKE THE DERIVED UNIT FACADE WORK
|
183 |
|
|
184 |
|
|
185 |
|
/** {@inheritDoc} */
|
186 |
|
@Override
|
187 |
|
protected void showParts() {
|
188 |
|
// FIXME (CM) : Need to clean out this code.
|
189 |
|
// Too much type checking to decide which detail view to display.
|
190 |
|
// Need to build in a mechanism where navigators / editors are 'aware'
|
191 |
|
// of the corresponding detail viewer.
|
192 |
|
|
193 |
|
Object input = getInput();
|
194 |
|
|
195 |
|
destroySections();
|
196 |
|
if (input instanceof TaxonBase) {
|
197 |
|
if(((TaxonBase) input).getName()==null){
|
198 |
|
createEmptySection(rootElement);
|
199 |
|
}
|
200 |
|
else{
|
201 |
|
createTaxonSections(rootElement);
|
202 |
|
}
|
203 |
|
|
204 |
|
} else if (input instanceof TaxonName) {
|
205 |
|
createNameSections(rootElement);
|
206 |
|
|
207 |
|
} else if (input instanceof Reference) {
|
208 |
|
createReferenceSections(rootElement);
|
209 |
|
|
210 |
|
} else if (input instanceof Team) {
|
211 |
|
createTeamDetailSection(rootElement);
|
212 |
|
|
213 |
|
} else if (input instanceof Person) {
|
214 |
|
createPersonDetailSection(rootElement);
|
215 |
|
|
216 |
|
} else if (input instanceof TeamOrPersonBase) {
|
217 |
|
createTeamOrPersonBaseDetailSection(rootElement);
|
218 |
|
|
219 |
|
} else if (input instanceof DescriptionBase) {
|
220 |
|
if(input instanceof SpecimenDescription){
|
221 |
|
//TODO: add more sections to DetailsView for SpecimenDescription
|
222 |
|
createSpecimenDescriptionSection(rootElement);
|
223 |
|
}
|
224 |
|
else{
|
225 |
|
Set<Marker> descriptionMarkers = ((DescriptionBase<?>) input).getMarkers();
|
226 |
|
|
227 |
|
Boolean isUseDescription = false;
|
228 |
|
for (Marker marker : descriptionMarkers) {
|
229 |
|
if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
|
230 |
|
isUseDescription = true;
|
231 |
|
}
|
232 |
|
}
|
233 |
|
if (((DescriptionBase<?>) input).isImageGallery()) {
|
234 |
|
createImageGallerySection(rootElement);
|
235 |
|
|
236 |
|
} else if (isUseDescription) {
|
237 |
|
createUseDescriptionSection(rootElement);
|
238 |
|
} else {
|
239 |
|
createDescriptionSection(rootElement);
|
240 |
|
|
241 |
|
}
|
242 |
|
}
|
243 |
|
} else if (input instanceof DescriptionElementBase) {
|
244 |
|
Set<Marker> descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
|
245 |
|
|
246 |
|
Boolean isUseDescription = false;
|
247 |
|
for (Marker marker : descriptionMarkers) {
|
248 |
|
if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
|
249 |
|
isUseDescription = true;
|
250 |
|
}
|
251 |
|
}
|
252 |
|
|
253 |
|
if (isUseDescription == true && input instanceof CategoricalData) {
|
254 |
|
createUseRecordSection(rootElement);
|
255 |
|
} else {
|
256 |
|
createDescriptionElementSection(rootElement);
|
257 |
|
}
|
258 |
|
|
259 |
|
} else if (input instanceof Media) {
|
260 |
|
createMediaElementSection(rootElement);
|
261 |
|
|
262 |
|
} else if (input instanceof DerivedUnitFacade) {
|
263 |
|
if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
|
264 |
|
if(((DerivedUnitFacade) input).innerFieldUnit()==null){
|
265 |
|
MessagingUtils.error(DetailsViewer.class, "FieldUnit of facade is null", null);
|
266 |
|
}
|
267 |
|
else{
|
268 |
|
createFieldUnitSection(rootElement);
|
269 |
|
}
|
270 |
|
}
|
271 |
|
else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.PreservedSpecimen){
|
272 |
|
if(((DerivedUnitFacade) input).innerDerivedUnit()==null){
|
273 |
|
MessagingUtils.error(DetailsViewer.class, "DerivedUnit of facade is null", null);
|
274 |
|
}
|
275 |
|
else{
|
276 |
|
createDerivedUnitBaseElementSection(rootElement);
|
277 |
|
}
|
278 |
|
}
|
279 |
|
else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){
|
280 |
|
//TissueSample should only be created by using it's own class
|
281 |
|
//in future using only one class with different SpecimenOrObservationTypes is desired
|
282 |
|
createTissueSampleSection(rootElement);
|
283 |
|
}
|
284 |
|
else{
|
285 |
|
createDerivedUnitBaseElementSection(rootElement);
|
286 |
|
}
|
287 |
|
} else if (input instanceof DnaSample){
|
288 |
|
DnaSample dnaSample = (DnaSample)input;
|
289 |
|
if(dnaSample.getRecordBasis()==SpecimenOrObservationType.TissueSample){
|
290 |
|
createTissueSampleSection(rootElement);
|
291 |
|
}
|
292 |
|
else if(dnaSample.getRecordBasis()==SpecimenOrObservationType.DnaSample){
|
293 |
|
createDnaSampleSection(rootElement);
|
294 |
|
}
|
295 |
|
} else if (input instanceof MediaSpecimen){
|
296 |
|
createMediaSpecimenSection(rootElement);
|
297 |
|
}
|
298 |
|
else if(input instanceof Sequence){
|
299 |
|
createSequenceSection(rootElement);
|
300 |
|
}
|
301 |
|
else if(input instanceof SingleRead){
|
302 |
|
createSingleReadSection(rootElement);
|
303 |
|
}
|
304 |
|
else if (input instanceof FeatureNodeContainer) {
|
305 |
|
createFeatureDistributionSection(rootElement);
|
306 |
|
|
307 |
|
}else if ((input instanceof PolytomousKeyNode) || (input instanceof PolytomousKeyRelationship)) {
|
308 |
|
createPolytomousKeyNodeSection(rootElement);
|
309 |
|
} else if (input instanceof User) {
|
310 |
|
createUserSection(rootElement);
|
311 |
|
} else if (input instanceof Group) {
|
312 |
|
createGroupSection(rootElement);
|
313 |
|
} else if (input instanceof TaxonRelationship && ((TaxonRelationship)input).getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())) {
|
314 |
|
createMisappliedNameSection(rootElement);
|
315 |
|
}else if (input instanceof TaxonRelationship ) {
|
316 |
|
createTaxonRelationshipSection(rootElement);
|
317 |
|
} else if (input instanceof TermVocabulary) {
|
318 |
|
createTermVocabularySection(rootElement);
|
319 |
|
} else if (input instanceof DefinedTermBase) {
|
320 |
|
createDefinedTermSection(rootElement);
|
321 |
|
}
|
322 |
|
else {
|
323 |
|
createEmptySection(rootElement);
|
324 |
|
}
|
325 |
|
layout();
|
326 |
|
|
327 |
|
}
|
328 |
|
|
329 |
|
|
330 |
|
private void createEmptySection(RootElement parent) {
|
331 |
|
destroySections();
|
332 |
|
|
333 |
|
EmptySection emptySection = formFactory.createEmptySection(formFactory, parent, SWT.NONE);
|
334 |
|
|
335 |
|
addPart(emptySection);
|
336 |
|
}
|
337 |
|
|
338 |
|
private void createGroupSection(RootElement parent) {
|
339 |
|
destroySections();
|
340 |
|
|
341 |
|
GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
|
342 |
|
MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
343 |
|
GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
344 |
|
|
345 |
|
addPart(groupDetailSection);
|
346 |
|
addPart(memberDetailSection);
|
347 |
|
addPart(grantedAuthorityDetailSection);
|
348 |
|
}
|
349 |
|
|
350 |
|
/** {@inheritDoc} */
|
351 |
|
@Override
|
352 |
|
public ISelection getSelection() {
|
353 |
|
return selection;
|
354 |
|
}
|
355 |
|
|
356 |
|
/** {@inheritDoc} */
|
357 |
|
@Override
|
358 |
|
public void setSelection(ISelection selection, boolean reveal) {
|
359 |
|
|
360 |
|
this.selection = selection;
|
361 |
|
|
362 |
|
if(this.selection!=null){
|
363 |
|
SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
|
364 |
|
fireSelectionChanged(selectionChangedEvent);
|
365 |
|
}
|
366 |
|
|
367 |
|
}
|
368 |
|
|
369 |
|
private void createTaxonSections(RootElement parent) {
|
370 |
|
destroySections();
|
371 |
|
|
372 |
|
ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
|
373 |
|
ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
|
374 |
|
if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
|
375 |
|
TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
|
376 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
377 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
378 |
|
addPart(taxonBaseDetailSection);
|
379 |
|
}else{
|
380 |
|
if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
|
381 |
|
TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
|
382 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
383 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
384 |
|
|
385 |
|
addPart(taxonBaseDetailSection);
|
386 |
|
}
|
387 |
|
}
|
388 |
|
NonViralNameDetailSection nonViralNameSection = formFactory
|
389 |
|
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
|
390 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
391 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
392 |
|
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))){
|
393 |
|
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
|
394 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
395 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
396 |
|
addPart(referenceDetailSection);
|
397 |
|
|
398 |
|
}
|
399 |
|
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))){
|
400 |
|
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
|
401 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
402 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
403 |
|
addPart(nomenclaturalStatusSection);
|
404 |
|
}
|
405 |
|
|
406 |
|
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))){
|
407 |
|
ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
408 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
409 |
|
addPart(protologSection);
|
410 |
|
}
|
411 |
|
|
412 |
|
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))){
|
413 |
|
TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
414 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
415 |
|
addPart(typeDesignationSection);
|
416 |
|
}
|
417 |
|
|
418 |
|
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))){
|
419 |
|
NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
420 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
421 |
|
addPart(nameRelationshipSection);
|
422 |
|
}
|
423 |
|
|
424 |
|
|
425 |
|
addPart(parsingMessagesSection);
|
426 |
|
|
427 |
|
addPart(nonViralNameSection);
|
428 |
|
|
429 |
|
}
|
430 |
|
|
431 |
|
private void createNameSections(RootElement parent) {
|
432 |
|
destroySections();
|
433 |
|
NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
|
434 |
|
getConversationHolder(), parent, this, false, ExpandableComposite.TWISTIE
|
435 |
|
| ExpandableComposite.EXPANDED);
|
436 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
437 |
|
|
438 |
|
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
|
439 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
440 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
441 |
|
|
442 |
|
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
|
443 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
444 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
445 |
|
|
446 |
|
addPart(nonViralNameSection);
|
447 |
|
addPart(nomenclaturalStatusSection);
|
448 |
|
addPart(referenceDetailSection);
|
449 |
|
|
450 |
|
ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
451 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
452 |
|
|
453 |
|
TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
454 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
455 |
|
|
456 |
|
NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
457 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
458 |
|
addPart(protologSection);
|
459 |
|
addPart(typeDesignationSection);
|
460 |
|
addPart(nameRelationshipSection);
|
461 |
|
|
462 |
|
}
|
463 |
|
|
464 |
|
private void createReferenceSections(RootElement parent) {
|
465 |
|
destroySections();
|
466 |
|
|
467 |
|
ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
|
468 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
469 |
|
|
470 |
|
addPart(referenceDetailSection);
|
471 |
|
}
|
472 |
|
|
473 |
|
private void createTeamOrPersonBaseDetailSection(RootElement parent) {
|
474 |
|
destroySections();
|
475 |
|
TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
476 |
|
|
477 |
|
addPart(teamOrPersonBaseDetailSection);
|
478 |
|
}
|
479 |
|
|
480 |
|
private void createTeamDetailSection(RootElement parent) {
|
481 |
|
destroySections();
|
482 |
|
TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
483 |
|
|
484 |
|
addPart(teamDetailSection);
|
485 |
|
}
|
486 |
|
|
487 |
|
private void createPersonDetailSection(RootElement parent) {
|
488 |
|
destroySections();
|
489 |
|
PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
490 |
|
addPart(personDetailSection);
|
491 |
|
}
|
492 |
|
|
493 |
|
private void createDescriptionElementSection(RootElement parent) {
|
494 |
|
destroySections();
|
495 |
|
|
496 |
|
DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
497 |
|
|
498 |
|
// IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
499 |
|
|
500 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
501 |
|
|
502 |
|
DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
503 |
|
|
504 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
505 |
|
|
506 |
|
DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
507 |
|
|
508 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
509 |
|
|
510 |
|
addPart(descriptionElementDetailSection);
|
511 |
|
addPart(descriptionElementSourceSection);
|
512 |
|
addPart(descriptionElementMediaSection);
|
513 |
|
}
|
514 |
|
|
515 |
|
private void createDescriptionSection(RootElement parent) {
|
516 |
|
destroySections();
|
517 |
|
DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
518 |
|
|
519 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
520 |
|
|
521 |
|
NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
522 |
|
|
523 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
524 |
|
|
525 |
|
// DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
526 |
|
//
|
527 |
|
// formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
528 |
|
|
529 |
|
// DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
|
530 |
|
// .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
|
531 |
|
// getConversationHolder(), parent, Section.TWISTIE);
|
532 |
|
//
|
533 |
|
// formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
534 |
|
|
535 |
|
ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
536 |
|
|
537 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
538 |
|
|
539 |
|
addPart(descriptionDetailSection);
|
540 |
|
addPart(naturalLanguageSection);
|
541 |
|
// addPart(describedSpecimenSection);
|
542 |
|
// addPart(descriptionSourceSection);
|
543 |
|
addPart(scopeSection);
|
544 |
|
}
|
545 |
|
|
546 |
|
private void createSpecimenDescriptionSection(RootElement parent) {
|
547 |
|
destroySections();
|
548 |
|
DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
549 |
|
addPart(descriptionDetailSection);
|
550 |
|
}
|
551 |
|
|
552 |
|
private void createUseDescriptionSection(RootElement parent) {
|
553 |
|
destroySections();
|
554 |
|
DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
555 |
|
|
556 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
557 |
|
|
558 |
|
DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
559 |
|
|
560 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
561 |
|
|
562 |
|
addPart(descriptionDetailSection);
|
563 |
|
addPart(descriptionSourceSection);
|
564 |
|
|
565 |
|
}
|
566 |
|
|
567 |
|
private void createImageGallerySection(RootElement parent) {
|
568 |
|
destroySections();
|
569 |
|
DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
570 |
|
|
571 |
|
addPart(descriptionDetailSection);
|
572 |
|
}
|
573 |
|
|
574 |
|
private void createMediaElementSection(RootElement parent) {
|
575 |
|
destroySections();
|
576 |
|
|
577 |
|
MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
578 |
|
|
579 |
|
addPart(mediaDetailSection);
|
580 |
|
}
|
581 |
|
|
582 |
|
private void createDerivedUnitBaseElementSection(RootElement parent) {
|
583 |
|
destroySections();
|
584 |
|
|
585 |
|
DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
586 |
|
//TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
|
587 |
|
// if(!(AbstractUtility.getActiveE4Part() instanceof IDerivedUnitFacadePart)){
|
588 |
|
// derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
|
589 |
|
// }
|
590 |
|
addPart(derivedUnitGeneralDetailSection);
|
591 |
|
|
592 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
593 |
|
|
594 |
|
DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
595 |
|
addPart(derivedUnitBaseDetailSection);
|
596 |
|
|
597 |
|
//for editors working with facades
|
598 |
|
if(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart){
|
599 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
600 |
|
GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
|
601 |
|
addPart(gatheringEventDetailSection);
|
602 |
|
|
603 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
604 |
|
FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
|
605 |
|
addPart(fieldUnitDetailSection);
|
606 |
|
}
|
607 |
|
else{
|
608 |
|
|
609 |
|
if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
|
610 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
611 |
|
TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
612 |
|
addPart(taxonAssociationDetailSection);
|
613 |
|
}
|
614 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
615 |
|
DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
616 |
|
addPart(identifierDetailSection);
|
617 |
|
}
|
618 |
|
if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
|
619 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
620 |
|
DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
|
621 |
|
addPart(determinationDetailSection);
|
622 |
|
}
|
623 |
|
|
624 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
625 |
|
DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
|
626 |
|
addPart(derivedUnitTypeDesignationSection);
|
627 |
|
|
628 |
|
}
|
629 |
|
|
630 |
|
private void createFieldUnitSection(RootElement parent) {
|
631 |
|
destroySections();
|
632 |
|
|
633 |
|
FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
634 |
|
|
635 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
636 |
|
|
637 |
|
GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
|
638 |
|
|
639 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
640 |
|
|
641 |
|
FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
|
642 |
|
|
643 |
|
addPart(fielUnitGeneralDetailSection);
|
644 |
|
addPart(gatheringEventDetailSection);
|
645 |
|
addPart(fieldUnitDetailSection);
|
646 |
|
|
647 |
|
if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
|
648 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
649 |
|
DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
|
650 |
|
addPart(determinationDetailSection);
|
651 |
|
}
|
652 |
|
}
|
653 |
|
|
654 |
|
private void createTissueSampleSection(RootElement parent) {
|
655 |
|
destroySections();
|
656 |
|
|
657 |
|
TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
658 |
|
|
659 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
660 |
|
|
661 |
|
SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
662 |
|
|
663 |
|
addPart(section);
|
664 |
|
addPart(sampleDesignationDetailSection);
|
665 |
|
}
|
666 |
|
|
667 |
|
private void createDnaSampleSection(RootElement parent) {
|
668 |
|
destroySections();
|
669 |
|
|
670 |
|
DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
671 |
|
|
672 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
673 |
|
|
674 |
|
DnaSamplePreparationPreservationSection preparationPreservationSection = formFactory.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
675 |
|
|
676 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
677 |
|
|
678 |
|
DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
679 |
|
|
680 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
681 |
|
|
682 |
|
SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
683 |
|
|
684 |
|
addPart(section);
|
685 |
|
addPart(preparationPreservationSection);
|
686 |
|
addPart(qualitySection);
|
687 |
|
addPart(sampleDesignationDetailSection);
|
688 |
|
}
|
689 |
|
|
690 |
|
private void createSequenceSection(RootElement parent) {
|
691 |
|
destroySections();
|
692 |
|
|
693 |
|
SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
694 |
|
|
695 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
696 |
|
|
697 |
|
SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
698 |
|
|
699 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
700 |
|
|
701 |
|
SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
702 |
|
|
703 |
|
|
704 |
|
addPart(section);
|
705 |
|
addPart(referenceSection);
|
706 |
|
addPart(contigFileSection);
|
707 |
|
}
|
708 |
|
|
709 |
|
private void createSingleReadSection(RootElement parent) {
|
710 |
|
destroySections();
|
711 |
|
|
712 |
|
SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
713 |
|
addPart(section);
|
714 |
|
|
715 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
716 |
|
|
717 |
|
SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
718 |
|
addPart(pherogramSection);
|
719 |
|
|
720 |
|
}
|
721 |
|
|
722 |
|
private void createMediaSpecimenSection(RootElement parent) {
|
723 |
|
destroySections();
|
724 |
|
|
725 |
|
MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
726 |
|
addPart(generalSection);
|
727 |
|
|
728 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
729 |
|
|
730 |
|
RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
731 |
|
addPart(rightsSection);
|
732 |
|
|
733 |
|
}
|
734 |
|
|
735 |
|
private void createFeatureDistributionSection(RootElement parent) {
|
736 |
|
destroySections();
|
737 |
|
|
738 |
|
FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
739 |
|
|
740 |
|
addPart(featureDistributionSection);
|
741 |
|
}
|
742 |
|
|
743 |
|
private void createPolytomousKeyNodeSection(RootElement parent) {
|
744 |
|
destroySections();
|
745 |
|
|
746 |
|
PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
|
747 |
|
|
748 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
749 |
|
|
750 |
|
PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
751 |
|
|
752 |
|
addPart(polytomousKeyDetailSection);
|
753 |
|
addPart(polytomousKeyNodeDetailSection);
|
754 |
|
|
755 |
|
}
|
756 |
|
|
757 |
|
private void createUseRecordSection(RootElement parent) {
|
758 |
|
destroySections();
|
759 |
|
|
760 |
|
UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
761 |
|
|
762 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
763 |
|
|
764 |
|
addPart(descriptionUseRecordSection);
|
765 |
|
|
766 |
|
|
767 |
|
}
|
768 |
|
|
769 |
|
private void createUserSection(RootElement parent) {
|
770 |
|
destroySections();
|
771 |
|
|
772 |
|
UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
773 |
|
|
774 |
|
GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
775 |
|
|
776 |
|
addPart(userDetailSection);
|
777 |
|
addPart(groupByUserDetailSection);
|
778 |
|
}
|
779 |
|
|
780 |
|
private void createMisappliedNameSection(RootElement parent) {
|
781 |
|
destroySections();
|
782 |
|
|
783 |
|
TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
784 |
|
|
785 |
|
// ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
786 |
|
addPart(taxonRelationshipDetailSection);
|
787 |
|
//addPart(referencedEntityBaseDetailSection);
|
788 |
|
|
789 |
|
NonViralNameDetailSection nonViralNameSection = formFactory
|
790 |
|
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
|
791 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
792 |
|
addPart(nonViralNameSection);
|
793 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
794 |
|
//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))){
|
795 |
|
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
|
796 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
797 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
798 |
|
addPart(referenceDetailSection);
|
799 |
|
|
800 |
|
//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))){
|
801 |
|
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
|
802 |
|
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
803 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
804 |
|
addPart(nomenclaturalStatusSection);
|
805 |
|
//}
|
806 |
|
|
807 |
|
//if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
|
808 |
|
ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
809 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
810 |
|
addPart(protologSection);
|
811 |
|
//}
|
812 |
|
|
813 |
|
//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))){
|
814 |
|
TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
815 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
816 |
|
addPart(typeDesignationSection);
|
817 |
|
//}
|
818 |
|
|
819 |
|
//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))){
|
820 |
|
NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
|
821 |
|
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
|
822 |
|
addPart(nameRelationshipSection);
|
823 |
|
//}
|
824 |
|
|
825 |
|
|
826 |
|
//}
|
827 |
|
}
|
828 |
|
|
829 |
|
private void createTaxonRelationshipSection(RootElement parent) {
|
830 |
|
destroySections();
|
831 |
|
|
832 |
|
TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
833 |
|
|
834 |
|
ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
835 |
|
addPart(taxonRelationshipDetailSection);
|
836 |
|
addPart(referencedEntityBaseDetailSection);
|
837 |
|
}
|
838 |
|
private void createTermVocabularySection(RootElement parent) {
|
839 |
|
destroySections();
|
840 |
|
|
841 |
|
TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
842 |
|
addPart(termVocabularyDetailSection);
|
843 |
|
}
|
844 |
|
|
845 |
|
private void createDefinedTermSection(RootElement parent) {
|
846 |
|
destroySections();
|
847 |
|
|
848 |
|
AbstractFormSection<?> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
|
849 |
|
addPart(definedTermDetailSection);
|
850 |
|
}
|
851 |
|
|
852 |
|
@Override
|
853 |
|
public void update(CdmDataChangeMap arg0) {
|
854 |
|
|
855 |
|
}
|
856 |
|
|
857 |
|
}
|
ref #6913 Remove details and supplemental view