import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailSection;
import eu.etaxonomy.taxeditor.ui.section.agent.TeamOrPersonBaseDetailSection;
import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.description.DescribedSpecimenSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementMediaSection;
import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.identifier.IdentifierDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.association.DerivedUnitTypeDesignationSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.identifier.DerivedUnitFacadeIdentifierSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
public class DetailsViewer extends AbstractCdmDataViewer {
private ISelection selection;
-
+
public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
super(parent, viewPart);
}
ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
-
- TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- //TODO RL
- if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
+ TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- addPart(protologSection);
- addPart(typeDesignationSection);
- addPart(nameRelationshipSection);
+ addPart(taxonBaseDetailSection);
+ }else{
+ if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
+ TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+
+ addPart(taxonBaseDetailSection);
+ }
+ }
+ NonViralNameDetailSection nonViralNameSection = formFactory
+ .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ 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))){
+ NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(referenceDetailSection);
+
+ }
+ 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))){
+ NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
+ ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(nomenclaturalStatusSection);
+ }
+ if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL) ){
+ 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))){
+ ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(protologSection);
+ }
+
+ 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))){
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(typeDesignationSection);
+ }
+
+ 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))){
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ addPart(nameRelationshipSection);
+ }
}
addPart(parsingMessagesSection);
- addPart(taxonBaseDetailSection);
+
addPart(nonViralNameSection);
- addPart(nomenclaturalStatusSection);
- addPart(referenceDetailSection);
+
}
private void createNameSections(RootElement parent) {
destroySections();
- NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
+ getConversationHolder(), parent, this, false, ExpandableComposite.TWISTIE
+ | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+// DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+//
+// formFactory.createHorizontalSeparator(parent, SWT.BORDER);
// DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
// .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
addPart(descriptionDetailSection);
addPart(naturalLanguageSection);
- addPart(describedSpecimenSection);
+// addPart(describedSpecimenSection);
// addPart(descriptionSourceSection);
addPart(scopeSection);
}
FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
addPart(fieldUnitDetailSection);
}
+ else{
+ if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ addPart(taxonAssociationDetailSection);
+ }
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ addPart(identifierDetailSection);
+ }
if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
addPart(determinationDetailSection);
}
- if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(taxonAssociationDetailSection);
- }
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- IdentifierDetailSection identifierDetailSection = formFactory.createIdentifierDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- addPart(identifierDetailSection);
+ DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ addPart(derivedUnitTypeDesignationSection);
}
addPart(definedTermDetailSection);
}
+ @Override
+ public void update(CdmDataChangeMap arg0) {
+
+ }
+
}