* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
package eu.etaxonomy.taxeditor.view.e4.details;
+import java.util.Collection;
+import java.util.EnumSet;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TreeNode;
import org.eclipse.swt.SWT;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.springframework.security.core.GrantedAuthority;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
import eu.etaxonomy.cdm.model.agent.Person;
import eu.etaxonomy.cdm.model.agent.Team;
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
-import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.Group;
import eu.etaxonomy.cdm.model.common.Marker;
-import eu.etaxonomy.cdm.model.common.TermVocabulary;
-import eu.etaxonomy.cdm.model.common.User;
import eu.etaxonomy.cdm.model.description.CategoricalData;
import eu.etaxonomy.cdm.model.description.Character;
import eu.etaxonomy.cdm.model.description.DescriptionBase;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
import eu.etaxonomy.cdm.model.description.Distribution;
-import eu.etaxonomy.cdm.model.description.FeatureNode;
-import eu.etaxonomy.cdm.model.description.FeatureTree;
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
import eu.etaxonomy.cdm.model.description.SpecimenDescription;
+import eu.etaxonomy.cdm.model.description.TaxonDescription;
import eu.etaxonomy.cdm.model.media.Media;
import eu.etaxonomy.cdm.model.molecular.DnaSample;
import eu.etaxonomy.cdm.model.molecular.Sequence;
import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
+import eu.etaxonomy.cdm.model.permission.CRUD;
+import eu.etaxonomy.cdm.model.permission.Group;
+import eu.etaxonomy.cdm.model.permission.User;
import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.cdm.model.taxon.Synonym;
+import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.cdm.model.term.DefinedTermBase;
+import eu.etaxonomy.cdm.model.term.TermNode;
+import eu.etaxonomy.cdm.model.term.TermTree;
+import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.cdm.model.term.TermVocabulary;
+import eu.etaxonomy.cdm.persistence.dto.TermNodeDto;
+import eu.etaxonomy.cdm.persistence.dto.TermTreeDto;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.editor.IDistributionEditor;
+import eu.etaxonomy.taxeditor.editor.IBulkEditor;
+import eu.etaxonomy.taxeditor.editor.IDistributionEditorPart;
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
+import eu.etaxonomy.taxeditor.l10n.Messages;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
+import eu.etaxonomy.taxeditor.preference.NameDetailsConfigurator;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.store.UsageTermCollection;
-import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.termtree.e4.ICharacterEditor;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.RootElement;
import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
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.DescriptionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailElement;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementMediaSection;
import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceSection;
import eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection;
import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageSection;
import eu.etaxonomy.taxeditor.ui.section.description.ScopeSection;
+import eu.etaxonomy.taxeditor.ui.section.description.detail.DistributionDetailElement;
import eu.etaxonomy.taxeditor.ui.section.feature.CharacterDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.CharacterNodeDtoDetailSection;
import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.feature.FeatureNodeDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.feature.FeatureTreeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.TermNodeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.TermTreeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.feature.TermTreeDetailSectionForNode;
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.name.NameRelationshipDetailSection;
import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitFacadeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitFacadeGeneralDetailSection;
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.user.GroupsByUserDetailSection;
import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermMediaSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
-import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
+import eu.etaxonomy.taxeditor.view.detail.CdmSectionPart;
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
/**
- *
* The DetailsViewer handles the content of the details view (
- * {@link DetailsViewPart}).<br>
+ * {@link DetailsPartE4}).<br>
* Depending on the type of the selected element the section of the details view
* are created.
*
* @author pplitzner
* @date 18.07.2017
- *
*/
public class DetailsViewerE4 extends AbstractCdmDataViewerE4 {
private ISelection selection;
private boolean detailsEnabled = true;
+ private Object activePart;
public boolean isDetailsEnabled() {
return detailsEnabled;
}
public void setInput(Object input, Object activePart) {
- if (activePart instanceof IDistributionEditor){
- detailsEnabled = false;
- }else{
- detailsEnabled = true;
- }
+ this.activePart = activePart;
setInput(input);
}
if(input instanceof GbifResponse){
input = ((GbifResponse) input).getDerivedUnitFacade();
}
- if(input instanceof FeatureNode
- && HibernateProxyHelper.isInstanceOf(((FeatureNode) input).getFeature(), Character.class)){
- input = HibernateProxyHelper.deproxy(((FeatureNode) input).getFeature(), Character.class);
- }
- if (input !=null && input.getClass().equals(DerivedUnit.class)) {
+ if (input instanceof DerivedUnit) {
DerivedUnit derivedUnit = (DerivedUnit)input;
- try {
- input = DerivedUnitFacade.NewInstance(derivedUnit,
- PreferencesUtil.getDerivedUnitConfigurator());
- } catch (DerivedUnitFacadeNotSupportedException e) {
- // 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
+ if ((derivedUnit instanceof MediaSpecimen
+ || (derivedUnit instanceof DnaSample && derivedUnit.getRecordBasis() == SpecimenOrObservationType.DnaSample ))
+ && !(this.activePart instanceof IBulkEditor)){
+ //do nothing
+ }else{
+ try {
+ input = DerivedUnitFacade.NewInstance(derivedUnit,
+ PreferencesUtil.getDerivedUnitConfigurator());
+ } catch (DerivedUnitFacadeNotSupportedException e) {
+ 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
+ }
}
}
else if(input instanceof FieldUnit){
}
}
- /** {@inheritDoc} */
@Override
protected void showParts() {
// FIXME (CM) : Need to clean out this code.
// of the corresponding detail viewer.
Object input = getInput();
-
+ if (input == null){
+ return;
+ }
destroySections();
if (input instanceof TaxonBase) {
- if(((TaxonBase) input).getName()==null){
- createEmptySection(rootElement);
+ if(((TaxonBase<?>) input).getName()==null){
+ createEmptySection(Messages.DetailsViewerE4_TAXON_HAS_NO_NAME, rootElement);
}
else{
createTaxonSections(rootElement);
createTeamOrPersonBaseDetailSection(rootElement);
} else if (input instanceof DescriptionBase) {
+ if (((DescriptionBase)input).isComputed()){
+ this.setDetailsEnabled(false);
+ }
if(input instanceof SpecimenDescription){
//TODO: add more sections to DetailsView for SpecimenDescription
createSpecimenDescriptionSection(rootElement);
} else if (isUseDescription) {
createUseDescriptionSection(rootElement);
- } else {
- createDescriptionSection(rootElement);
+ } else if (input instanceof TaxonDescription){
+ createTaxonDescriptionSection(rootElement, !((DescriptionBase) input).isComputed());
+ } else{
+ createDescriptionSection(rootElement, false, !((DescriptionBase) input).isComputed());
}
}
} else if (input instanceof DescriptionElementBase){
isUseDescription = true;
}
}
-
+ if (((DescriptionElementBase)input).getInDescription().isComputed()){
+ this.setDetailsEnabled(false);
+ }
if (isUseDescription == true && input instanceof CategoricalData) {
createUseRecordSection(rootElement);
} else {
- createDescriptionElementSection(rootElement);
+ createDescriptionElementSection(rootElement, activePart);
}
} else if (input instanceof Media) {
createMediaElementSection(rootElement);
-
+ }
+ //FIXME hack to show more informative message to the user when
+ //DerivedUnit has more than one FieldUnit #4363
+ else if (input instanceof DerivedUnit && !(input instanceof MediaSpecimen) && !(input instanceof DnaSample)) {
+ DerivedUnit derivedUnit = (DerivedUnit)input;
+ try {
+ input = DerivedUnitFacade.NewInstance(derivedUnit,
+ PreferencesUtil.getDerivedUnitConfigurator());
+ } catch (DerivedUnitFacadeNotSupportedException e) {
+ createEmptySection(e.getMessage(), rootElement);
+ }
} else if (input instanceof DerivedUnitFacade) {
- if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
- if(((DerivedUnitFacade) input).innerFieldUnit()==null){
- MessagingUtils.error(DetailsViewerE4.class, "FieldUnit of facade is null", null);
+ DerivedUnitFacade facade = (DerivedUnitFacade) input;
+ if(facade.getType() == SpecimenOrObservationType.FieldUnit){
+ if(facade.innerFieldUnit() == null){
+ MessagingUtils.error(DetailsViewerE4.class, "FieldUnit of facade is null", null); //$NON-NLS-1$
}
else{
- createFieldUnitSection(rootElement);
+ createFieldUnitFacadeSection(rootElement);
}
}
- else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.PreservedSpecimen){
- if(((DerivedUnitFacade) input).innerDerivedUnit()==null){
- MessagingUtils.error(DetailsViewerE4.class, "DerivedUnit of facade is null", null);
+ else if(facade.getType() == SpecimenOrObservationType.PreservedSpecimen){
+ if(facade.innerDerivedUnit() == null){
+ MessagingUtils.error(DetailsViewerE4.class, "DerivedUnit of facade is null", null); //$NON-NLS-1$
}
else{
createDerivedUnitBaseElementSection(rootElement);
}
}
- else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){
+ else if(facade.getType() == SpecimenOrObservationType.TissueSample){
//TissueSample should only be created by using it's own class
//in future using only one class with different SpecimenOrObservationTypes is desired
createTissueSampleSection(rootElement);
- }
- else{
+ }else if (facade.innerDerivedUnit() instanceof DnaSample){
+ createEmptySection("DNA sample not supported by specimen list editor", rootElement);
+ }else if (facade.innerDerivedUnit() instanceof MediaSpecimen){
+ createEmptySection("Image specimen not supported by specimen list editor", rootElement);
+ }else if(facade.getType()==SpecimenOrObservationType.DnaSample){
+
+ if(facade.innerDerivedUnit().getRecordBasis()==SpecimenOrObservationType.TissueSample){
+ //this case seems to be very unlikely as innerDerivedUnit in real cases should more or less always have the same type
+ createTissueSampleSection(rootElement);
+ }
+ else if(facade.innerDerivedUnit().getRecordBasis()==SpecimenOrObservationType.DnaSample){
+ createDnaSampleSection(rootElement);
+ }
+ }else{
createDerivedUnitBaseElementSection(rootElement);
}
} else if (input instanceof DnaSample){
else if (input instanceof FeatureNodeContainer) {
createFeatureDistributionSection(rootElement);
- } else if (input instanceof FeatureNode) {
- createFeatureNodeSection(rootElement);
+ } else if (input instanceof TermNode) {
+ TermType type= ((TermNode<?>) input).getTermType();
+ if(type.equals(TermType.Character) ){
+ createCharacterNodeSection(rootElement);
+ }
+ else if(type.equals(TermType.Feature)){
+ createFeatureNodeSection(rootElement);
+ }
- } else if (input instanceof FeatureTree) {
+ } else if (input instanceof TermTree) {
createFeatureTreeSection(rootElement);
+ } else if (input instanceof TermNodeDto) {
+ TermType type= ((TermNodeDto) input).getTerm().getTermType();
+ if(type.equals(TermType.Character) && activePart instanceof ICharacterEditor){
+ createCharacterNodeDtoSection(rootElement);
+ }
+ else if(type.equals(TermType.Feature) || type.equals(TermType.Character)){
+ createFeatureNodeSection(rootElement);
+ }
+
+ } else if (input instanceof TermTreeDto) {
+ createFeatureTreeSectionForDto(rootElement);
} else if (input instanceof Character) {
createCharacterSection(rootElement);
} else if (input instanceof Group) {
createGroupSection(rootElement);
} else if (input instanceof TaxonRelationship && ((TaxonRelationship)input).getType()!=null
- && ((TaxonRelationship)input).getType().isAnyMisappliedName()) {
+ && (((TaxonRelationship)input).getType().isAnyMisappliedName() || ((TaxonRelationship)input).getType().isAnySynonym() || ((TaxonRelationship)input).getType().isMisappliedName())){
createMisappliedNameSection(rootElement);
}else if (input instanceof TaxonRelationship ) {
createTaxonRelationshipSection(rootElement);
// createDescriptionElementSection(rootElement);
}else {
- createEmptySection(rootElement);
+ createEmptySection(null, rootElement);
}
layout();
-
}
private void createGroupSection(RootElement parent) {
- destroySections();
-
- GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
- MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(GroupDetailSection.class, getInput().getClass().getCanonicalName()));
+ MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(MemberDetailSection.class, getInput().getClass().getCanonicalName()));
+ GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,StoreUtil.getSectionStyle(GrantedAuthorityDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(groupDetailSection);
addPart(memberDetailSection);
addPart(grantedAuthorityDetailSection);
}
- /** {@inheritDoc} */
@Override
public ISelection getSelection() {
return selection;
}
- /** {@inheritDoc} */
@Override
public void setSelection(ISelection selection, boolean reveal) {
this.selection = selection;
-
if(this.selection!=null){
SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
fireSelectionChanged(selectionChangedEvent);
}
-
}
private void createTaxonSections(RootElement parent) {
- destroySections();
-
+ NameDetailsConfigurator config = PreferencesUtil.getPreferredNameDetailsConfiguration();
+ EnumSet<CRUD> requiredCrud;
+ if(getInput() == null || StoreUtil.getCdmEntity(getInput()).getId() == 0) {
+ // new entity, not yet saved
+ requiredCrud = EnumSet.of(CRUD.CREATE);
+ } else {
+ requiredCrud = EnumSet.of(CRUD.UPDATE);
+ }
+ boolean hasPermission = CdmStore.currentAuthentiationHasPermission(StoreUtil.getCdmEntity(getInput()), requiredCrud);
+ if (hasPermission){
+ // check for subtree permissions as well.
+ TaxonBase<?> taxonBase = (TaxonBase<?>)getInput();
+ Taxon acceptedTaxon = null;
+ if (taxonBase instanceof Taxon){
+ acceptedTaxon = (Taxon)taxonBase;
+ }else{
+ acceptedTaxon = ((Synonym)taxonBase).getAcceptedTaxon();
+ }
+ if (acceptedTaxon != null){ //needs discussion if synonyms without accepted taxon should never be filtered by subtree permission(current implementation). See also #8849
+ Set<TaxonNode> nodes = acceptedTaxon.getTaxonNodes();
+ for (TaxonNode node: nodes){
+ hasPermission &= CdmStore.currentAuthentiationHasPermission(node, requiredCrud);
+ if (!hasPermission){
+ //check whether there are explicit TaxonNode rights
+ boolean taxonnodePermissionExists = false;
+ Collection<? extends GrantedAuthority> authorities = CdmStore.getCurrentAuthentiation().getAuthorities();
+ for (GrantedAuthority grantedAuthority: authorities){
+ if (grantedAuthority.getAuthority().startsWith("TAXONNODE")){
+ taxonnodePermissionExists = true;
+ }
+ }
+ if (!taxonnodePermissionExists){
+ hasPermission = true;
+ }
+ }
+ }
+ }
+ }
+ detailsEnabled = hasPermission;
ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
- ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
- if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
+ StoreUtil.getSectionStyle(ParsingMessagesSection.class, getInput().getClass().getCanonicalName(), true));
+ if (config == null){
TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(TaxonBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ // boolean hasPermission = CdmStore.currentAuthentiationHasPermission(getInput(), Operation.UPDATE);
+ taxonBaseDetailSection.setEnabled(detailsEnabled);
addPart(taxonBaseDetailSection);
}else{
- if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
+ if (config.isTaxonSectionActivated()){
TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(TaxonBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
+ taxonBaseDetailSection.setEnabled(detailsEnabled);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
addPart(taxonBaseDetailSection);
}
}
NonViralNameDetailSection nonViralNameSection = formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(NonViralNameDetailSection.class, getInput().getClass().getCanonicalName(), true));
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))){
+ nonViralNameSection.setEnabled(detailsEnabled);
+ if (config == null || config.isNomenclaturalReferenceSectionActivated()){
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(NomenclaturalReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
+ referenceDetailSection.setEnabled(detailsEnabled);
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))){
+ if ( config == null || config.isNomenclaturalStatusSectionActivated()){
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(NomenclaturalStatusSection.class, getInput().getClass().getCanonicalName(), true));
+ nomenclaturalStatusSection.setEnabled(detailsEnabled);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nomenclaturalStatusSection);
}
- 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 ( config == null || config.isProtologueActivated()){
+// ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ProtologueSection.class, getInput().getClass().getCanonicalName()));
+// protologSection.setEnabled(detailsEnabled);
+// 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);
+ if (config == null || config.isTypeDesignationSectionActivated()){
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TypeDesignationSection.class, getInput().getClass().getCanonicalName()));
+ typeDesignationSection.setEnabled(detailsEnabled);
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);
+ if (config == null || config.isNameRelationsSectionActivated()){
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(NameRelationshipDetailSection.class, getInput().getClass().getCanonicalName()));
+ nameRelationshipSection.setEnabled(detailsEnabled);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nameRelationshipSection);
}
-
addPart(parsingMessagesSection);
-
addPart(nonViralNameSection);
-
}
private void createNameSections(RootElement parent) {
- destroySections();
NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
- getConversationHolder(), parent, this, false, ExpandableComposite.TWISTIE
- | ExpandableComposite.EXPANDED);
+ getConversationHolder(), parent, this, false, StoreUtil.getSectionStyle(NonViralNameDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(NomenclaturalReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(NomenclaturalStatusSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nonViralNameSection);
addPart(nomenclaturalStatusSection);
addPart(referenceDetailSection);
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+// ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ProtologueSection.class, getInput().getClass().getCanonicalName()));
+// formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TypeDesignationSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(NameRelationshipDetailSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(protologSection);
+// addPart(protologSection);
addPart(typeDesignationSection);
addPart(nameRelationshipSection);
-
}
private void createReferenceSections(RootElement parent) {
- destroySections();
-
ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(ReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(referenceDetailSection);
}
private void createTeamOrPersonBaseDetailSection(RootElement parent) {
- destroySections();
- TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TeamOrPersonBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(teamOrPersonBaseDetailSection);
}
private void createTeamDetailSection(RootElement parent) {
- destroySections();
- TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TeamDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(teamDetailSection);
}
private void createPersonDetailSection(RootElement parent) {
- destroySections();
- PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(PersonDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(personDetailSection);
}
private void createDescriptionElementSection(RootElement parent) {
+ createDescriptionElementSection(parent, null);
+ }
- destroySections();
- DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ private void createDescriptionElementSection(RootElement parent, Object activePart) {
+ DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionElementDetailSection.class, getInput().getClass().getCanonicalName(), true));
descriptionElementDetailSection.setEnabled(this.detailsEnabled);
- // IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ // IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent, getSectionStyle(.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ DescriptionElementSourceSection descriptionElementSourceSection;
+ if (activePart != null && activePart instanceof IDistributionEditorPart){
+ Reference defaultSource =((IDistributionEditorPart)activePart).getEditor().getDefaultSource();
+ descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, defaultSource, StoreUtil.getSectionStyle(DescriptionElementSourceSection.class, getInput().getClass().getCanonicalName()));
- DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ }else{
+ descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionElementSourceSection.class, getInput().getClass().getCanonicalName()) );
+ }
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionElementMediaSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(descriptionElementMediaSection);
}
- private void createDescriptionSection(RootElement parent) {
- destroySections();
- DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ private void createDescriptionSection(RootElement parent, boolean isTaxonDescription, boolean isEnabled) {
+ DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionDetailSection.class, getInput().getClass().getCanonicalName(), true));
+ descriptionDetailSection.setEnabled(isEnabled);
+ addPart(descriptionDetailSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ if(isTaxonDescription) {
+ NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(
+ getConversationHolder(), parent, this, StoreUtil.getSectionStyle(NaturalLanguageSection.class, getInput().getClass().getCanonicalName(), true));
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ naturalLanguageSection.setEnabled(isEnabled);
+ addPart(naturalLanguageSection);
+ }
+ DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(
+ getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionSourceSection.class, getInput().getClass().getCanonicalName(), true));
+ descriptionSourceSection.setEnabled(isEnabled);
+ addPart(descriptionSourceSection);
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,
- // getConversationHolder(), parent, Section.TWISTIE);
- //
- // formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
- ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ if(isTaxonDescription) {
+ ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ScopeSection.class, getInput().getClass().getCanonicalName()));
+ scopeSection.setEnabled(isEnabled);
+ addPart(scopeSection);
+ }
+ }
- addPart(descriptionDetailSection);
- addPart(naturalLanguageSection);
- // addPart(describedSpecimenSection);
- // addPart(descriptionSourceSection);
- addPart(scopeSection);
+ private void createTaxonDescriptionSection(RootElement parent, boolean isEnabled) {
+ createDescriptionSection(parent, true, isEnabled);
}
private void createSpecimenDescriptionSection(RootElement parent) {
- destroySections();
- DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(descriptionDetailSection);
+ createDescriptionSection(parent, false, true);
}
private void createUseDescriptionSection(RootElement parent) {
- destroySections();
- DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionDetailSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionSourceSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(descriptionDetailSection);
addPart(descriptionSourceSection);
-
}
private void createImageGallerySection(RootElement parent) {
- destroySections();
- DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(descriptionDetailSection);
}
private void createMediaElementSection(RootElement parent) {
- destroySections();
-
- MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(MediaDetailsSection.class, getInput().getClass().getCanonicalName(), true));
addPart(mediaDetailSection);
}
private void createDerivedUnitBaseElementSection(RootElement parent) {
- destroySections();
-
- DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DerivedUnitGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
//TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
if(!(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart)){
derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DerivedUnitBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(derivedUnitBaseDetailSection);
//for editors working with facades
if(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(GatheringEventDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(gatheringEventDetailSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ FieldUnitFacadeDetailSection fieldUnitDetailSection = formFactory.createFieldUnitFacadeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FieldUnitFacadeDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(fieldUnitDetailSection);
}
else{
if(PreferencesUtil.isShowTaxonAssociations()){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TaxonAssociationDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(taxonAssociationDetailSection);
}
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DerivedUnitFacadeIdentifierSection.class, getInput().getClass().getCanonicalName()));
addPart(identifierDetailSection);
}
if(!PreferencesUtil.isDeterminationOnlyForFieldUnits()){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DeterminationDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(determinationDetailSection);
}
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DerivedUnitTypeDesignationSection.class, getInput().getClass().getCanonicalName()));
addPart(derivedUnitTypeDesignationSection);
-
}
- private void createFieldUnitSection(RootElement parent) {
- destroySections();
-
- FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ private void createFieldUnitFacadeSection(RootElement parent) {
+ FieldUnitFacadeGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitFacadeGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FieldUnitFacadeGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(GatheringEventDetailSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ FieldUnitFacadeDetailSection fieldUnitDetailSection = formFactory.createFieldUnitFacadeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FieldUnitFacadeDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(fielUnitGeneralDetailSection);
addPart(gatheringEventDetailSection);
addPart(fieldUnitDetailSection);
- if(PreferencesUtil.isDeterminationOnlyForFieldUnits()){
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(determinationDetailSection);
- }
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DeterminationDetailSection.class, getInput().getClass().getCanonicalName()));
+ addPart(determinationDetailSection);
}
private void createTissueSampleSection(RootElement parent) {
- destroySections();
-
- TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TissueSampleGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SampleDesignationDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(section);
addPart(sampleDesignationDetailSection);
}
private void createDnaSampleSection(RootElement parent) {
- destroySections();
-
- DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DnaSampleGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DnaSamplePreparationPreservationSection preparationPreservationSection = formFactory.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DnaSamplePreparationPreservationSection preparationPreservationSection = formFactory.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DnaSamplePreparationPreservationSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DnaQualityDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SampleDesignationDetailSection.class, getInput().getClass().getCanonicalName(), true));
+ formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+ DeterminationDetailSection determinationDetailSection = null;
+ if(!PreferencesUtil.isDeterminationOnlyForFieldUnits()){
+ determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DeterminationDetailSection.class, getInput().getClass().getCanonicalName()));
+ }
addPart(section);
addPart(preparationPreservationSection);
addPart(qualitySection);
addPart(sampleDesignationDetailSection);
+ if(!PreferencesUtil.isDeterminationOnlyForFieldUnits()){
+ addPart(determinationDetailSection);
+ }
}
private void createSequenceSection(RootElement parent) {
- destroySections();
-
- SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SequenceGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(SequenceReferenceCollectionDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
+ SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(SequenceContigFileCollectionDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(section);
addPart(referenceSection);
}
private void createSingleReadSection(RootElement parent) {
- destroySections();
-
- SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SingleReadGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(section);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(SingleReadPherogramCollectionDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(pherogramSection);
-
}
private void createMediaSpecimenSection(RootElement parent) {
- destroySections();
-
- MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(MediaSpecimenGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(generalSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(RightsSection.class, getInput().getClass().getCanonicalName()));
+// rightsSection.setEntity(generalSection.getEntity().innerDerivedUnit());
addPart(rightsSection);
-
}
- private void createFeatureTreeSection(RootElement parent) {
- destroySections();
-
- FeatureTreeDetailSection section = formFactory.createFeatureTreeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ private void createFeatureTreeSectionForDto(RootElement parent) {
+ TermTreeDetailSection section = formFactory.createFeatureTreeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TermTreeDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(section);
}
+ private void createFeatureTreeSection(RootElement parent) {
+ TermTreeDetailSectionForNode section = formFactory.createFeatureTreeDetailSectionForTree(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TermTreeDetailSection.class, getInput().getClass().getCanonicalName(), true));
+ addPart(section);
+ }
private void createFeatureNodeSection(RootElement parent) {
- destroySections();
-
- FeatureNodeDetailSection featureDistributionSection = formFactory.createFeatureNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
+ TermNodeDetailSection featureDistributionSection = formFactory.createFeatureNodeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TermNodeDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(featureDistributionSection);
}
private void createFeatureDistributionSection(RootElement parent) {
- destroySections();
+ FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FeatureDistributionDetailSection.class, getInput().getClass().getCanonicalName(), true));
+ addPart(featureDistributionSection);
+ }
- FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ private void createCharacterNodeSection(RootElement parent) {
+ CharacterNodeDetailSection featureDistributionSection = formFactory.createCharacterNodeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(CharacterDetailSection.class, getInput().getClass().getCanonicalName(), true));
+ addPart(featureDistributionSection);
+ }
+ private void createCharacterNodeDtoSection(RootElement parent) {
+ CharacterNodeDtoDetailSection featureDistributionSection = formFactory.createCharacterNodeDtoDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(CharacterDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(featureDistributionSection);
}
private void createCharacterSection(RootElement parent) {
- destroySections();
-
- CharacterDetailSection featureDistributionSection = formFactory.createCharacterDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
+ CharacterDetailSection featureDistributionSection = formFactory.createCharacterDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(CharacterDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(featureDistributionSection);
}
private void createPolytomousKeyNodeSection(RootElement parent) {
- destroySections();
-
- PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(PolytomousKeyDetailSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(PolytomousKeyNodeDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(polytomousKeyDetailSection);
addPart(polytomousKeyNodeDetailSection);
}
private void createUseRecordSection(RootElement parent) {
- destroySections();
-
- UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
+ UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,StoreUtil.getSectionStyle(UseRecordDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
addPart(descriptionUseRecordSection);
-
-
}
private void createUserSection(RootElement parent) {
- destroySections();
-
- UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(UserDetailSection.class, getInput().getClass().getCanonicalName(), true));
- GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(GroupsByUserDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(userDetailSection);
addPart(groupByUserDetailSection);
}
private void createMisappliedNameSection(RootElement parent) {
- destroySections();
-
TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(TaxonRelationshipDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(taxonRelationshipDetailSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
NonViralNameDetailSection nonViralNameSection = formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(NonViralNameDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(nonViralNameSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(NomenclaturalReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(referenceDetailSection);
-
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
- ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ StoreUtil.getSectionStyle(NomenclaturalStatusSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nomenclaturalStatusSection);
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(protologSection);
+// ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ProtologueSection.class, getInput().getClass().getCanonicalName()));
+// formFactory.createHorizontalSeparator(parent, SWT.BORDER);
+// addPart(protologSection);
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TypeDesignationSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(typeDesignationSection);
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(NameRelationshipDetailSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nameRelationshipSection);
-
}
private void createTaxonRelationshipSection(RootElement parent) {
- destroySections();
+ TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TaxonRelationshipDetailSection.class, getInput().getClass().getCanonicalName(), true));
- TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
- ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(ReferencedEntityDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(taxonRelationshipDetailSection);
addPart(referencedEntityBaseDetailSection);
}
private void createTermVocabularySection(RootElement parent) {
- destroySections();
-
- TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TermVocabularyDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(termVocabularyDetailSection);
}
private void createDefinedTermSection(RootElement parent) {
- destroySections();
-
- AbstractFormSection<?> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ DefinedTermDetailSection<?> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DefinedTermDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(definedTermDetailSection);
+ TermMediaSection termMediaSection = formFactory.createTermMediaSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DefinedTermDetailSection.class, getInput().getClass().getCanonicalName(), true));
+ addPart(termMediaSection);
}
@Override
}
@Inject
@Optional
- private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_TAXON_DETAILS)boolean refresh){
+ private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_DETAILS)boolean refresh){
if(refresh){
refresh();
+ }
+ }
-// setSelection(getSelection(), true);
+ @Inject
+ @Optional
+ private void updateView(@UIEventTopic(WorkbenchEventConstants.REFRESH_DETAILS_DISTRIBUTION)String nameCache){
+ if(nameCache != null && getInput() instanceof Distribution && this.activePart instanceof IDistributionEditorPart){
+ if (part instanceof CdmSectionPart && ((CdmSectionPart)part).getSection() instanceof DescriptionElementDetailSection){
+ for (ICdmFormElement element: ((DescriptionElementDetailSection)((CdmSectionPart)part).getSection()).getElements()){
+ if (element instanceof DescriptionElementDetailElement){
+ for(ICdmFormElement descriptionElement:((DescriptionElementDetailElement)element).getElements()){
+ if (descriptionElement instanceof DistributionDetailElement){
+ ((DistributionDetailElement) descriptionElement).setName(nameCache);
+ }
+ }
+ }
+ }
+ }
}
}
-}
+}
\ No newline at end of file