import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.view.detail.CdmSectionPart;
import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
/**
return title.replace("&", "&&");
}
- public static String getPrefKey(Class<? extends AbstractFormSection> sectionClass, Object entity) {
- return sectionClass.getCanonicalName()+";"+entity.getClass().getCanonicalName();
+ public static String getPrefKey(Class<? extends AbstractFormSection> sectionClass, String entity) {
+ return sectionClass.getCanonicalName()+";"+entity;
}
/**
}
return string1.compareTo(string2);
}
+
+ public static int getSectionStyle(Class<? extends AbstractFormSection> clazz, String input){
+ return StoreUtil.getSectionStyle(clazz, input, false);
+ }
+
+ public static int getSectionStyle(Class<? extends AbstractFormSection> clazz, String input, boolean initiallyExpanded){
+ int style = ExpandableComposite.TWISTIE;
+ String prefKey = getPrefKey(clazz, input);
+ if(PreferencesUtil.contains(prefKey)){
+ style = PreferencesUtil.getStringValue(prefKey)==CdmSectionPart.EXPANDED?style |= ExpandableComposite.EXPANDED:style;
+ }
+ else{
+ style = initiallyExpanded?style |= ExpandableComposite.EXPANDED:style;
+ }
+ return style;
+ }
}
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.events.ExpansionAdapter;
+import org.eclipse.ui.forms.events.ExpansionEvent;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
import eu.etaxonomy.cdm.model.term.TermVocabulary;
import eu.etaxonomy.cdm.strategy.parser.ParserProblem;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
import eu.etaxonomy.taxeditor.ui.combo.InverseTermWrapper;
import eu.etaxonomy.taxeditor.ui.combo.MisappliedRelationshipComboElement;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElementWithAbbreviatedTitle;
import eu.etaxonomy.taxeditor.ui.selection.NomenclaturalAuthorTeamSelectionElement;
import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
+import eu.etaxonomy.taxeditor.view.detail.CdmSectionPart;
/**
* <p>
section.addFocusListener(selectionFocusHandler);
section.setPropertyChangeListeners(propertyChangeListeners);
+ section.addExpansionListener(new ExpansionAdapter(){
+ @Override
+ public void expansionStateChanged(ExpansionEvent e) {
+ super.expansionStateChanged(e);
+ if(section.getEntity()!=null){
+ PreferencesUtil.setStringValue(StoreUtil.getPrefKey(section.getClass(), section.getEntity().getClass().getCanonicalName()), e.getState()?CdmSectionPart.EXPANDED:CdmSectionPart.COLLAPSED);
+ }
+ }
+ });
+
if (section.getToggle() != null) {
section.getToggle().setHoverDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE_HOVER));
section.getToggle().setDecorationColor(getColors().getColor(IFormColors.TB_TOGGLE));
import java.util.Arrays;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.model.agent.Team;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
/** {@inheritDoc} */
@Override
protected void createControls(ICdmFormElement formElement, Team entity, int style) {
-
+
setWarnForReferencingObjects(formElement);
toggleable_cache = formFactory.createToggleableTextField(formElement, "Title Cache", entity.getTitleCache(), entity.isProtectedTitleCache(), style);
toggleable_nomenclaturalTitleCache = formFactory.createToggleableTextField(formElement, "Abbrev. Title", entity.getNomenclaturalTitle(), entity.isProtectedNomenclaturalTitleCache(), style);
hasAdditionalMembers = formFactory.createCheckbox(formElement, "Additional Members", entity.isHasMoreMembers(), style);
- section_teamMembers = formFactory.createTeamMemberSection(getConversationHolder(), formElement, ExpandableComposite.EXPANDED, isNomenclaturalTeam);
+ section_teamMembers = formFactory.createTeamMemberSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(TeamMemberSection.class, entity.getClass().getCanonicalName(), true), isNomenclaturalTeam);
section_teamMembers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.Classification;
import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
entity != null ? entity.getMicroReference() : null, SWT.NULL);
element_date = formFactory.createTimePeriodElement(formElement, "Date",
entity.getTimeperiod(), style);
- section_collectingAreas = formFactory.createGeoScopeDetailSection(getConversationHolder(), formElement, SWT.NULL);
+ section_collectingAreas = formFactory.createGeoScopeDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(GeoScopeDetailSection.class, entity.getClass().getCanonicalName()));
section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_collectingAreas.setEntity(entity);
import eu.etaxonomy.cdm.model.taxon.Taxon;
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
multiLanguageTextExcludedNotes.setEnabled(false);
}
if (!isCreateNew()){
- selectionNodeAgentRelation = formFactory.createTaxonNodeAgentRelationCollectionSection(formElement, getConversationHolder(), style);
+ selectionNodeAgentRelation = formFactory.createTaxonNodeAgentRelationCollectionSection(formElement, getConversationHolder(), StoreUtil.getSectionStyle(TaxonNodeAgentRelationCollectionSection.class, entity.getClass().getCanonicalName()));
selectionNodeAgentRelation.setEntity(entity);
selectionNodeAgentRelation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
import eu.etaxonomy.cdm.model.description.DescriptionElementSource;
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
import eu.etaxonomy.cdm.model.name.TaxonName;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.IEntityElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractOriginalSourceElement;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
formElement, "Name in Source",
null, EntitySelectionElement.ALL, SWT.NULL);
- externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName()));
externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
import java.util.Set;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
import eu.etaxonomy.cdm.model.common.LanguageString;
-import eu.etaxonomy.cdm.model.term.TermType;
-import eu.etaxonomy.cdm.model.term.TermVocabulary;
import eu.etaxonomy.cdm.model.description.State;
import eu.etaxonomy.cdm.model.description.StateData;
+import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.cdm.model.term.TermVocabulary;
import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
@Override
public void createControls(ICdmFormElement element, int style) {
combo_state = formFactory.createDefinedTermComboElement(TermType.State, element, "State", null, style);
- section_modifiers = formFactory.createModifierSection(getConversationHolder(), element, ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
+ section_modifiers = formFactory.createModifierSection(getConversationHolder(), element, StoreUtil.getSectionStyle(ModifierSection.class, StateData.class.getCanonicalName(), true));
section_modifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
text_modifyingText = formFactory.createTextWithLabelElement(element, "Modifying Text", null, style);
}
import java.util.Set;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
+import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
public void createControls(ICdmFormElement element, int style) {
number_value = formFactory.createNumberTextWithLabelElement(element, "Value", 0, style);
combo_type = formFactory.createDefinedTermComboElement(TermType.StatisticalMeasure, element, "Statistical Measure", null, style);
- section_modifiers = formFactory.createModifierSection(getConversationHolder(), element, ExpandableComposite.TWISTIE);
+ section_modifiers = formFactory.createModifierSection(getConversationHolder(), element, StoreUtil.getSectionStyle(ModifierSection.class, StatisticalMeasurementValue.class.getCanonicalName()));
section_modifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
package eu.etaxonomy.taxeditor.ui.section.description.detail;
import org.eclipse.swt.SWT;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
protected void createModifier(ICdmFormElement formElement, DescriptionElementBase entity,
int style) {
- section_modifiers = formFactory.createModifierSection(getConversationHolder(), this, ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED);
+ section_modifiers = formFactory.createModifierSection(getConversationHolder(), this, StoreUtil.getSectionStyle(ModifierSection.class, entity.getClass().getCanonicalName(), true));
section_modifiers.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_modifiers.setEntity(entity);
*/
package eu.etaxonomy.taxeditor.ui.section.description.detail;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.model.description.CategoricalData;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
CategoricalData entity, int style) {
checkbox_orderRelevant = formFactory.createCheckbox(formElement, "Order Relevant", entity.getOrderRelevant(), style);
- section_stateData = formFactory.createStateDataSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ section_stateData = formFactory.createStateDataSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(StateDataSection.class, entity.getClass().getCanonicalName(), true));
section_stateData.setEntity(entity);
section_stateData.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
createTimePeriod(formElement, entity, style);
import java.util.ArrayList;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.model.description.MeasurementUnit;
import eu.etaxonomy.cdm.model.description.QuantitativeData;
import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
comboMeasurementUnit = formFactory.createDefinedTermComboElement(TermType.MeasurementUnit, formElement, "Measurement Unit", null, style);
comboMeasurementUnit.setTerms(new ArrayList<MeasurementUnit>(entity.getFeature().getRecommendedMeasurementUnits()));
comboMeasurementUnit.setSelection(entity.getUnit());
- section_statisticalMeasurementValues = formFactory.createStatisticalMeasurementValueSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ section_statisticalMeasurementValues = formFactory.createStatisticalMeasurementValueSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(StatisticalMeasurementValueSection.class, entity.getClass().getCanonicalName(), true));
section_statisticalMeasurementValues.setEntity(entity);
section_statisticalMeasurementValues.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
if (entity.getFeature().getRecommendedModifierEnumeration() != null && !entity.getFeature().getRecommendedModifierEnumeration().isEmpty()){
package eu.etaxonomy.taxeditor.ui.section.feature;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.cdm.model.description.Character;
if (supportsCategoricalData.getSelection()) {
sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(),
- parentFormElement, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
+ parentFormElement, StoreUtil.getSectionStyle(StateVocabularyCollectionSection.class, entity.getClass().getCanonicalName(), true));
sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionStateVocabularies.setEntity(getEntity());
}
if (supportsQuantitativeData.getSelection()) {
sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(),
- parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ parentFormElement, StoreUtil.getSectionStyle(MeasurementUnitCollectionSection.class, entity.getClass().getCanonicalName(), true));
sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionMeasurementUnits.setEntity(getEntity());
sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(getConversationHolder(),
- parentFormElement, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
+ parentFormElement, StoreUtil.getSectionStyle(StatisticalMeasureCollectionSection.class, entity.getClass().getCanonicalName(), true));
sectionStatisticalMeasures.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionStatisticalMeasures.setEntity(getEntity());
}
if (supportsCategoricalData.getSelection() || supportsQuantitativeData.getSelection()) {
sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(
- getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ getConversationHolder(), parentFormElement, StoreUtil.getSectionStyle(RecommendedModifierVocabulariesCollectionSection.class, entity.getClass().getCanonicalName(), true));
sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionModifierVocabularies.setEntity(getEntity());
}
//measurement units
sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(),
- parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ parentFormElement, StoreUtil.getSectionStyle(MeasurementUnitCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionMeasurementUnits.setEntity(getEntity());
//statistical measures
sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(
- getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ getConversationHolder(), parentFormElement, StoreUtil.getSectionStyle(StatisticalMeasureCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
sectionStatisticalMeasures.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionStatisticalMeasures.setEntity(getEntity());
//modifiers
sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(
- getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ getConversationHolder(), parentFormElement, StoreUtil.getSectionStyle(RecommendedModifierVocabulariesCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionModifierVocabularies.setEntity(getEntity());
}
//states
sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(),
- parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ parentFormElement, StoreUtil.getSectionStyle(StateVocabularyCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionStateVocabularies.setEntity(getEntity());
//modifiers
sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(
- getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ getConversationHolder(), parentFormElement, StoreUtil.getSectionStyle(RecommendedModifierVocabulariesCollectionSection.class, getEntity().getClass().getCanonicalName(), true));
sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionModifierVocabularies.setEntity(getEntity());
}
*/
package eu.etaxonomy.taxeditor.ui.section.feature;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.model.term.FeatureNode;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
@Override
protected void createControls(ICdmFormElement formElement, FeatureNode entity, int style) {
sectionInapplicableIf = formFactory.createInapplicableIfEntityCollectionSection(getConversationHolder(),
- formElement, ExpandableComposite.TWISTIE);
+ formElement, StoreUtil.getSectionStyle(InapplicableIfEntityCollectionSection.class, getEntity().getClass().getCanonicalName()));
sectionInapplicableIf.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionInapplicableIf.setEntity(getEntity());
sectionOnlyApplicableIf = formFactory.createOnlyApplicableIfEntityCollectionSection(getConversationHolder(),
- formElement, ExpandableComposite.TWISTIE);
+ formElement, StoreUtil.getSectionStyle(OnlyApplicableIfEntityCollectionSection.class, getEntity().getClass().getCanonicalName()));
sectionOnlyApplicableIf.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionOnlyApplicableIf.setEntity(getEntity());
}
*/
package eu.etaxonomy.taxeditor.ui.section.key;
-import org.eclipse.swt.SWT;
-
import eu.etaxonomy.cdm.model.description.PolytomousKey;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
numberStartNumber = formFactory.createNumberTextWithLabelElement(formElement, "Start Number", entity.getStartNumber(), style);
- sectionTaxonomicScope = formFactory.createTaxonomicScopeSection(getConversationHolder(), formElement, style);
+ sectionTaxonomicScope = formFactory.createTaxonomicScopeSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(TaxonomicScopeSection.class, entity.getClass().getCanonicalName()));
sectionTaxonomicScope.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionTaxonomicScope.setEntity(entity);
- sectionGeoScopes = formFactory.createGeoScopePolyKeyDetailSection(getConversationHolder(), formElement, SWT.NULL);
+ sectionGeoScopes = formFactory.createGeoScopePolyKeyDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(GeoScopePolyKeyDetailSection.class, entity.getClass().getCanonicalName()));
sectionGeoScopes.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionGeoScopes.setEntity(entity);
- sectionScopeRestriction = formFactory.createScopeRestrictionSection(getConversationHolder(), formElement, SWT.NULL);
+ sectionScopeRestriction = formFactory.createScopeRestrictionSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(ScopeRestrictionSection.class, entity.getClass().getCanonicalName()));
sectionScopeRestriction.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionScopeRestriction.setEntity(entity);
}
element_image.dispose();
element_image = null;
}
- section_mediaRepresentation = formFactory.createMediaRepresentationSection(getConversationHolder(), parentFormElement, style);
+ section_mediaRepresentation = formFactory.createMediaRepresentationSection(getConversationHolder(), parentFormElement, StoreUtil.getSectionStyle(MediaRepresentationSection.class, getEntity().getClass().getCanonicalName()));
section_mediaRepresentation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_mediaRepresentation.setEntity(getEntity());
//set buffered uri as text if uri had parsing problems in simple view
import eu.etaxonomy.cdm.model.media.ImageFile;
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
public void createControls(ICdmFormElement element, int style) {
text_mimeType = formFactory.createTextWithLabelElement(element, "Mime Type", null, style);
text_suffix = formFactory.createTextWithLabelElement(element, "Suffix", null, style);
- section_mediaRepresentationPart = formFactory.createMediaRepresentationPartSection(getConversationHolder(), element, style);
+ section_mediaRepresentationPart = formFactory.createMediaRepresentationPartSection(getConversationHolder(), element, StoreUtil.getSectionStyle(MediaRepresentationPartSection.class, MediaRepresentation.class.getCanonicalName()));
section_mediaRepresentationPart.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
import java.util.Arrays;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.model.name.IBacterialName;
import eu.etaxonomy.cdm.model.name.NomenclaturalCode;
import eu.etaxonomy.cdm.model.name.TaxonName;
}
- section_name = formFactory.createNameDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ section_name = formFactory.createNameDetailSection(getConversationHolder(), formElement, null, StoreUtil.getSectionStyle(NameDetailSection.class, entity.getClass().getCanonicalName(), true));
section_name.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_name);
addElement(section_name);
// if (isAdvancedView || PreferencesUtil.getBooleanValue(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_AUTHORSHIP)){
- section_author = formFactory.createAuthorshipDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+ section_author = formFactory.createAuthorshipDetailSection(getConversationHolder(), formElement, null, StoreUtil.getSectionStyle(AuthorshipDetailSection.class, entity.getClass().getCanonicalName(), true));
section_author.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_author);
addElement(section_author);
// }
//TODO RL
if (config.isHybridActivated()){
- section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
+ section_hybrid = formFactory.createHybridDetailSection(getConversationHolder(), formElement, null, StoreUtil.getSectionStyle(HybridDetailSection.class, entity.getClass().getCanonicalName()));
section_hybrid.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(section_hybrid);
addElement(section_hybrid);
package eu.etaxonomy.taxeditor.ui.section.occurrence;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.api.facade.MethodNotSupportedByDerivedUnitTypeException;
-import eu.etaxonomy.cdm.model.term.DefinedTerm;
-import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.cdm.model.name.TaxonName;
import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
+import eu.etaxonomy.cdm.model.term.DefinedTerm;
+import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
super.createControls(formElement, entity, style);
- section_source = formFactory.createSourceCollectionDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ section_source = formFactory.createSourceCollectionDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(SourceCollectionDetailSection.class, entity.getClass().getCanonicalName()));
section_source.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_source.setEntity(entity);
package eu.etaxonomy.taxeditor.ui.section.occurrence;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.occurrence.Collection;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
entity.getCountry(), EntitySelectionElement.DELETABLE, style);
if(PreferencesUtil.isCollectingAreaInGeneralSection()){
- section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(CollectingAreasDetailSection.class, entity.getClass().getCanonicalName()));
section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_collectingAreas.setEntity(entity);
}
package eu.etaxonomy.taxeditor.ui.section.occurrence;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
protected void createControls(ICdmFormElement formElement,
DerivedUnitFacade entity, int style) {
- section_currentDetermination = formFactory.createCurrentDeterminationDetailSection(getConversationHolder(), formElement, ExpandableComposite.EXPANDED);
+ section_currentDetermination = formFactory.createCurrentDeterminationDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(CurrentDeterminationDetailSection.class, entity.getClass().getCanonicalName(), true));
section_currentDetermination.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_currentDetermination.setEntity(entity);
- section_determinationHistory = formFactory.createDeterminationHistoryDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ section_determinationHistory = formFactory.createDeterminationHistoryDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(DeterminationHistoryDetailSection.class, entity.getClass().getCanonicalName()));
section_determinationHistory.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_determinationHistory.setEntity(entity);
*/
package eu.etaxonomy.taxeditor.ui.section.occurrence;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.location.NamedArea;
import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
selection_country = formFactory.createSelectionElement(NamedArea.class, //getConversationHolder(),
formElement, "Country", entity.getCountry(), EntitySelectionElement.DELETABLE, style);
if(PreferencesUtil.isCollectingAreaInGeneralSection()){
- section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(CollectingAreasDetailSection.class, entity.getClass().getCanonicalName()));
section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_collectingAreas.setEntity(entity);
}
package eu.etaxonomy.taxeditor.ui.section.occurrence;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.GatheringEventUnitElement;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
if(!PreferencesUtil.isCollectingAreaInGeneralSection()){
- section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ section_collectingAreas = formFactory.createCollectingAreasDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(CollectingAreasDetailSection.class, entity.getClass().getCanonicalName()));
section_collectingAreas.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_collectingAreas.setEntity(entity);
}
package eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
-import eu.etaxonomy.cdm.model.term.DefinedTerm;
-import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.cdm.model.name.TaxonName;
import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
import eu.etaxonomy.cdm.model.occurrence.PreservationMethod;
+import eu.etaxonomy.cdm.model.term.DefinedTerm;
+import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.store.CdmStore;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
text_exsicatum = formFactory.createTextWithLabelElement(formElement, "Exsiccatum", entity.getExsiccatum(), style);
- section_source = formFactory.createPreservedSpecimenSourceCollectionDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ section_source = formFactory.createPreservedSpecimenSourceCollectionDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(PreservedSpecimenSourceCollectionDetailSection.class, entity.getClass().getCanonicalName()));
section_source.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
section_source.setEntity(entity);
}
package eu.etaxonomy.taxeditor.ui.section.occurrence.dna;
import eu.etaxonomy.cdm.model.molecular.AmplificationResult;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
*/
@Override
protected void createControls(ICdmFormElement formElement, AmplificationResult entity, int style) {
- sectionGelPhoto = formFactory.createAmplificationGelPhotoCollectionDetailSection(getConversationHolder(), formElement, style);
+ sectionGelPhoto = formFactory.createAmplificationGelPhotoCollectionDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(AmplificationGelPhotoCollectionDetailSection.class, entity.getClass().getCanonicalName()));
sectionGelPhoto.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionGelPhoto.setEntity(entity);
}
import eu.etaxonomy.cdm.model.agent.AgentBase;
import eu.etaxonomy.cdm.model.agent.Institution;
-import eu.etaxonomy.cdm.model.term.DefinedTerm;
-import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.cdm.model.molecular.Amplification;
import eu.etaxonomy.cdm.model.molecular.Primer;
+import eu.etaxonomy.cdm.model.term.DefinedTerm;
+import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
selectionPrimerRW = formFactory.createSelectionElement(Primer.class, //getConversationHolder(),
formElement, "Primer RW", entity.getReversePrimer(), EntitySelectionElement.ALL, style);
- AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), formElement, style);
+ AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(AnnotationSection.class, entity.getClass().getCanonicalName()));
annotationSection.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
annotationSection.setEntity(entity);
}
*/
package eu.etaxonomy.taxeditor.ui.section.occurrence.dna;
-import eu.etaxonomy.cdm.model.term.DefinedTerm;
-import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.cdm.model.molecular.Primer;
import eu.etaxonomy.cdm.model.molecular.SequenceString;
import eu.etaxonomy.cdm.model.reference.Reference;
+import eu.etaxonomy.cdm.model.term.DefinedTerm;
+import eu.etaxonomy.cdm.model.term.TermType;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
entity.getPublishedIn(),
EntitySelectionElement.ALL, style);
- AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), formElement, style);
+ AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(AnnotationSection.class, entity.getClass().getCanonicalName()));
annotationSection.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
annotationSection.setEntity(entity);
}
package eu.etaxonomy.taxeditor.ui.section.occurrence.dna;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
protected void createControls(ICdmFormElement formElement,
IdentifiableEntity<?> entity, int style) {
- sectionCurrentSampleDesignation = formFactory.createCurrentSampleDesignationDetailSection(getConversationHolder(), formElement, ExpandableComposite.EXPANDED);
+ sectionCurrentSampleDesignation = formFactory.createCurrentSampleDesignationDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(CurrentSampleDesignationDetailSection.class, entity.getClass().getCanonicalName(), true));
sectionCurrentSampleDesignation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionCurrentSampleDesignation.setEntity(entity);
- sectionSampleDesignationHistory = formFactory.createSampleDesignationHistoryDetailSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ sectionSampleDesignationHistory = formFactory.createSampleDesignationHistoryDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(SampleDesignationHistoryDetailSection.class, entity.getClass().getCanonicalName()));
sectionSampleDesignationHistory.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
sectionSampleDesignationHistory.setEntity(entity);
import eu.etaxonomy.cdm.model.molecular.AmplificationResult;
import eu.etaxonomy.cdm.model.molecular.Primer;
import eu.etaxonomy.cdm.model.molecular.SingleRead;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
selectionAmplification = formFactory.createSelectionElement(Amplification.class, //getConversationHolder(),
formElement, "Amplification", amplificationResult.getAmplification(), EntitySelectionElement.ALL, style);
- AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), formElement, style);
+ AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(AnnotationSection.class, entity.getClass().getCanonicalName()));
annotationSection.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
annotationSection.setEntity(entity);
- AmplificationCloningDetailSection cloningSection = formFactory.createAmplificationCloningDetailSection(getConversationHolder(), formElement, formFactory.getSelectionProvider(), style);
+ AmplificationCloningDetailSection cloningSection = formFactory.createAmplificationCloningDetailSection(getConversationHolder(), formElement, formFactory.getSelectionProvider(), StoreUtil.getSectionStyle(AmplificationCloningDetailSection.class, amplificationResult.getClass().getCanonicalName()));
cloningSection.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
cloningSection.setEntity(amplificationResult);
- AmplificationGelPhotoCollectionDetailSection gelPhotoSection = formFactory.createAmplificationGelPhotoCollectionDetailSection(getConversationHolder(), formElement, style);
+ AmplificationGelPhotoCollectionDetailSection gelPhotoSection = formFactory.createAmplificationGelPhotoCollectionDetailSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(AmplificationGelPhotoCollectionDetailSection.class, amplificationResult.getClass().getCanonicalName()));
gelPhotoSection.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
gelPhotoSection.setEntity(amplificationResult);
}
package eu.etaxonomy.taxeditor.ui.section.supplemental;
import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
+import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksSection;
/**
* @author n.hoffmann
@Override
public void createControls(ICdmFormElement formElement, int style) {
super.createControls(formElement, style);
- externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE);
+ externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(ExternalLinksSection.class, IdentifiableSource.class.getCanonicalName()));
externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
import eu.etaxonomy.taxeditor.event.EventUtility;
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
import eu.etaxonomy.taxeditor.model.TaxonRelationshipTypeInverseContainer;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.combo.MisappliedRelationshipComboElement;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
taxon = entity.getFromTaxon();
- taxonElement = formFactory.createTaxonDetailSection(getConversationHolder(), formElement, null, style);
+ taxonElement = formFactory.createTaxonDetailSection(getConversationHolder(), formElement, null, StoreUtil.getSectionStyle(TaxonDetailSection.class, Taxon.class.getCanonicalName()));
taxonElement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(taxonElement);
addElement(taxonElement);
}else if (entity.getType().isAnySynonym() ){
taxon = entity.getFromTaxon();
- taxonElement = formFactory.createTaxonDetailSection(getConversationHolder(), formElement, null, style);
+ taxonElement = formFactory.createTaxonDetailSection(getConversationHolder(), formElement, null, StoreUtil.getSectionStyle(TaxonDetailSection.class, Taxon.class.getCanonicalName()));
taxonElement.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
addControl(taxonElement);
addElement(taxonElement);
*/\r
package eu.etaxonomy.taxeditor.ui.section.vocabulary;\r
\r
-import org.eclipse.ui.forms.widgets.ExpandableComposite;\r
-\r
import eu.etaxonomy.cdm.model.description.Feature;\r
import eu.etaxonomy.taxeditor.store.StoreUtil;\r
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;\r
\r
if (supportsCategoricalData.getSelection()) {\r
sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(),\r
- parentFormElement, ExpandableComposite.TWISTIE);\r
+ parentFormElement, StoreUtil.getSectionStyle(StateVocabularyCollectionSection.class, getEntity().getClass().getCanonicalName()));\r
sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionStateVocabularies.setEntity(getEntity());\r
\r
}\r
if (supportsQuantitativeData.getSelection()) {\r
sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(),\r
- parentFormElement, ExpandableComposite.TWISTIE);\r
+ parentFormElement, StoreUtil.getSectionStyle(MeasurementUnitCollectionSection.class, getEntity().getClass().getCanonicalName()));\r
sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionMeasurementUnits.setEntity(getEntity());\r
\r
sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(getConversationHolder(),\r
- parentFormElement, ExpandableComposite.TWISTIE);\r
+ parentFormElement, StoreUtil.getSectionStyle(StatisticalMeasureCollectionSection.class, getEntity().getClass().getCanonicalName()));\r
sectionStatisticalMeasures.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionStatisticalMeasures.setEntity(getEntity());\r
}\r
if (supportsCategoricalData.getSelection() || supportsQuantitativeData.getSelection()) {\r
sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(\r
- getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE\r
- );\r
+ getConversationHolder(), parentFormElement, StoreUtil.getSectionStyle(RecommendedModifierVocabulariesCollectionSection.class, getEntity().getClass().getCanonicalName()));\r
sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionModifierVocabularies.setEntity(getEntity());\r
}\r
\r
//measurement units\r
sectionMeasurementUnits = formFactory.createMeasurementUnitCollectionSection(getConversationHolder(),\r
- parentFormElement, ExpandableComposite.TWISTIE);\r
+ parentFormElement, StoreUtil.getSectionStyle(MeasurementUnitCollectionSection.class, getEntity().getClass().getCanonicalName()));\r
sectionMeasurementUnits.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionMeasurementUnits.setEntity(getEntity());\r
\r
//statistical measures\r
sectionStatisticalMeasures = formFactory.createStatisticalMeasureCollectionSection(\r
- getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+ getConversationHolder(), parentFormElement,StoreUtil.getSectionStyle(StatisticalMeasureCollectionSection.class, getEntity().getClass().getCanonicalName()));\r
sectionStatisticalMeasures.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionStatisticalMeasures.setEntity(getEntity());\r
\r
//modifiers\r
sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(\r
- getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+ getConversationHolder(), parentFormElement, StoreUtil.getSectionStyle(RecommendedModifierVocabulariesCollectionSection.class, getEntity().getClass().getCanonicalName()));\r
sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionModifierVocabularies.setEntity(getEntity());\r
}\r
\r
//states\r
sectionStateVocabularies = formFactory.createStateVocabulariesSection(getConversationHolder(),\r
- parentFormElement, ExpandableComposite.TWISTIE);\r
+ parentFormElement, StoreUtil.getSectionStyle(StateVocabularyCollectionSection.class, getEntity().getClass().getCanonicalName()));\r
sectionStateVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionStateVocabularies.setEntity(getEntity());\r
\r
//modifiers\r
sectionModifierVocabularies = formFactory.createRecommendedModifierVocabulariesCollectionSection(\r
- getConversationHolder(), parentFormElement, ExpandableComposite.TWISTIE);\r
+ getConversationHolder(), parentFormElement, StoreUtil.getSectionStyle(RecommendedModifierVocabulariesCollectionSection.class, getEntity().getClass().getCanonicalName()));\r
sectionModifierVocabularies.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));\r
sectionModifierVocabularies.setEntity(getEntity());\r
}\r
@Override
protected void expansionStateChanged(boolean expanded) {
super.expansionStateChanged(expanded);
- PreferencesUtil.setStringValue(StoreUtil.getPrefKey(formSection.getClass(), rootInput), expanded?EXPANDED:COLLAPSED);
+ PreferencesUtil.setStringValue(StoreUtil.getPrefKey(formSection.getClass(), rootInput.getClass().getCanonicalName()), expanded?EXPANDED:COLLAPSED);
}
}
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.forms.IFormPart;
import org.eclipse.ui.forms.ManagedForm;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.remoting.CdmEagerLoadingException;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
body.layout();
}
- protected int getSectionStyle(Class<? extends AbstractFormSection> clazz){
- return getSectionStyle(clazz, false);
- }
-
- protected int getSectionStyle(Class<? extends AbstractFormSection> clazz, boolean initiallyExpanded){
- int style = ExpandableComposite.TWISTIE;
- String prefKey = StoreUtil.getPrefKey(clazz, getInput());
- if(PreferencesUtil.contains(prefKey)){
- style = PreferencesUtil.getStringValue(prefKey)==CdmSectionPart.EXPANDED?style |= ExpandableComposite.EXPANDED:style;
- }
- else{
- style = initiallyExpanded?style |= ExpandableComposite.EXPANDED:style;
- }
- return style;
- }
-
protected abstract void showParts();
public void destroySections() {
import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
import eu.etaxonomy.taxeditor.preference.NameDetailsConfigurator;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.store.UsageTermCollection;
import eu.etaxonomy.taxeditor.ui.element.RootElement;
import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
}
private void createGroupSection(RootElement parent) {
- GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, getSectionStyle(GroupDetailSection.class));
- MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, getSectionStyle(MemberDetailSection.class));
- GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,getSectionStyle(GrantedAuthorityDetailSection.class));
+ 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);
private void createTaxonSections(RootElement parent) {
NameDetailsConfigurator config = PreferencesUtil.getPreferredNameDetailsConfiguration();
ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
- getSectionStyle(ParsingMessagesSection.class, true));
+ StoreUtil.getSectionStyle(ParsingMessagesSection.class, getInput().getClass().getCanonicalName(), true));
if (!config.isSimpleDetailsViewActivated()){
TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
- getSectionStyle(TaxonBaseDetailSection.class, true));
+ StoreUtil.getSectionStyle(TaxonBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(taxonBaseDetailSection);
}else{
if (config.isTaxonSectionActivated()){
TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
- getSectionStyle(TaxonBaseDetailSection.class, true));
+ StoreUtil.getSectionStyle(TaxonBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(taxonBaseDetailSection);
}
}
NonViralNameDetailSection nonViralNameSection = formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
- getSectionStyle(NonViralNameDetailSection.class, true));
+ StoreUtil.getSectionStyle(NonViralNameDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
if (!config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isNomenclaturalReferenceSectionActivated())){
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
- getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
+ StoreUtil.getSectionStyle(NomenclaturalReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(referenceDetailSection);
}
if ( !config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isNomenclaturalStatusSectionActivated())){
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
- getSectionStyle(NomenclaturalStatusSection.class, true));
+ StoreUtil.getSectionStyle(NomenclaturalStatusSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nomenclaturalStatusSection);
}
if ( !config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isProtologueActivated())){
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, getSectionStyle(ProtologueSection.class));
+ ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ProtologueSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(protologSection);
}
if (!config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() && config.isTypeDesignationSectionActivated())){
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, getSectionStyle(TypeDesignationSection.class));
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TypeDesignationSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(typeDesignationSection);
}
if (!config.isSimpleDetailsViewActivated() || (config.isSimpleDetailsViewActivated() &&config.isNameRelationsSectionActivated())){
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, getSectionStyle(NameRelationshipDetailSection.class));
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(NameRelationshipDetailSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nameRelationshipSection);
}
private void createNameSections(RootElement parent) {
NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
- getConversationHolder(), parent, this, false, getSectionStyle(NonViralNameDetailSection.class, true));
+ getConversationHolder(), parent, this, false, StoreUtil.getSectionStyle(NonViralNameDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
- getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
+ StoreUtil.getSectionStyle(NomenclaturalReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
- getSectionStyle(NomenclaturalStatusSection.class, true));
+ 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, getSectionStyle(ProtologueSection.class));
+ ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ProtologueSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, getSectionStyle(TypeDesignationSection.class));
+ TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TypeDesignationSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, getSectionStyle(NameRelationshipDetailSection.class));
+ NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(NameRelationshipDetailSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(protologSection);
addPart(typeDesignationSection);
private void createReferenceSections(RootElement parent) {
ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
- getSectionStyle(ReferenceDetailSection.class, true));
+ StoreUtil.getSectionStyle(ReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(referenceDetailSection);
}
private void createTeamOrPersonBaseDetailSection(RootElement parent) {
- TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, getSectionStyle(TeamOrPersonBaseDetailSection.class, true));
+ TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TeamOrPersonBaseDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(teamOrPersonBaseDetailSection);
}
private void createTeamDetailSection(RootElement parent) {
- TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, getSectionStyle(TeamDetailSection.class, true));
+ TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(TeamDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(teamDetailSection);
}
private void createPersonDetailSection(RootElement parent) {
- PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, getSectionStyle(PersonDetailSection.class, true));
+ PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(PersonDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(personDetailSection);
}
private void createDescriptionElementSection(RootElement parent) {
- DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionElementDetailSection.class, true));
+ 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, getSectionStyle(.class));
+ // IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent, getSectionStyle(.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, getSectionStyle(DescriptionElementSourceSection.class));
+ DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionElementSourceSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, getSectionStyle(DescriptionElementMediaSection.class));
+ DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionElementMediaSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
}
private void createDescriptionSection(RootElement parent, boolean isTaxonDescription) {
- DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionDetailSection.class, true));
+ DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(descriptionDetailSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
if(isTaxonDescription) {
NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(
- getConversationHolder(), parent, this, getSectionStyle(NaturalLanguageSection.class, true));
+ getConversationHolder(), parent, this, StoreUtil.getSectionStyle(NaturalLanguageSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(naturalLanguageSection);
}
DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(
- getConversationHolder(), parent, getSectionStyle(DescriptionSourceSection.class, true));
+ getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionSourceSection.class, getInput().getClass().getCanonicalName(), true));
addPart(descriptionSourceSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
if(isTaxonDescription) {
- ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, getSectionStyle(ScopeSection.class));
+ ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(ScopeSection.class, getInput().getClass().getCanonicalName()));
addPart(scopeSection);
}
}
}
private void createUseDescriptionSection(RootElement parent) {
- DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionDetailSection.class));
+ 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, getSectionStyle(DescriptionSourceSection.class));
+ DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DescriptionSourceSection.class, getInput().getClass().getCanonicalName()));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
}
private void createImageGallerySection(RootElement parent) {
- DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, getSectionStyle(DescriptionDetailSection.class));
+ DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DescriptionDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(descriptionDetailSection);
}
private void createMediaElementSection(RootElement parent) {
- MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, getSectionStyle(MediaDetailsSection.class));
+ MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(MediaDetailsSection.class, getInput().getClass().getCanonicalName()));
addPart(mediaDetailSection);
}
private void createDerivedUnitBaseElementSection(RootElement parent) {
- DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(DerivedUnitGeneralDetailSection.class, true));
+ 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, getSectionStyle(DerivedUnitBaseDetailSection.class, true));
+ 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, getSectionStyle(GatheringEventDetailSection.class));
+ 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, getSectionStyle(FieldUnitDetailSection.class));
+ FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FieldUnitDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(fieldUnitDetailSection);
}
else{
if(PreferencesUtil.isShowTaxonAssociations()){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, getSectionStyle(TaxonAssociationDetailSection.class, true));
+ 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, getSectionStyle(DerivedUnitFacadeIdentifierSection.class));
+ 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, getSectionStyle(DeterminationDetailSection.class));
+ 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, getSectionStyle(DerivedUnitTypeDesignationSection.class));
+ DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DerivedUnitTypeDesignationSection.class, getInput().getClass().getCanonicalName()));
addPart(derivedUnitTypeDesignationSection);
}
private void createFieldUnitSection(RootElement parent) {
- FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(FieldUnitGeneralDetailSection.class, true));
+ FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FieldUnitGeneralDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, getSectionStyle(GatheringEventDetailSection.class));
+ 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, getSectionStyle(FieldUnitDetailSection.class));
+ FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FieldUnitDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(fielUnitGeneralDetailSection);
addPart(gatheringEventDetailSection);
if(PreferencesUtil.isDeterminationOnlyForFieldUnits()){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, getSectionStyle(DeterminationDetailSection.class));
+ DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(DeterminationDetailSection.class, getInput().getClass().getCanonicalName()));
addPart(determinationDetailSection);
}
}
private void createTissueSampleSection(RootElement parent) {
- TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(TissueSampleGeneralDetailSection.class, true));
+ 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, getSectionStyle(SampleDesignationDetailSection.class, true));
+ SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SampleDesignationDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(section);
addPart(sampleDesignationDetailSection);
}
private void createDnaSampleSection(RootElement parent) {
- DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(DnaSampleGeneralDetailSection.class, true));
+ 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, getSectionStyle(DnaSamplePreparationPreservationSection.class, true));
+ 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, getSectionStyle(DnaQualityDetailSection.class, true));
+ 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, getSectionStyle(SampleDesignationDetailSection.class, true));
+ SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(SampleDesignationDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(section);
addPart(preparationPreservationSection);
}
private void createSequenceSection(RootElement parent) {
- SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(SequenceGeneralDetailSection.class, true));
+ 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, getSectionStyle(SequenceReferenceCollectionDetailSection.class, true));
+ 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, getSectionStyle(SequenceContigFileCollectionDetailSection.class, true));
+ SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(SequenceContigFileCollectionDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(section);
}
private void createSingleReadSection(RootElement parent) {
- SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(SingleReadGeneralDetailSection.class, true));
+ 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, getSectionStyle(SingleReadPherogramCollectionDetailSection.class, true));
+ SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(SingleReadPherogramCollectionDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(pherogramSection);
}
private void createMediaSpecimenSection(RootElement parent) {
- MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, getSectionStyle(MediaSpecimenGeneralDetailSection.class, true));
+ 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, getSectionStyle(RightsSection.class));
+ RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(RightsSection.class, getInput().getClass().getCanonicalName()));
addPart(rightsSection);
}
private void createFeatureTreeSection(RootElement parent) {
- FeatureTreeDetailSection section = formFactory.createFeatureTreeDetailSection(getConversationHolder(), parent, this, getSectionStyle(FeatureTreeDetailSection.class, true));
+ FeatureTreeDetailSection section = formFactory.createFeatureTreeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FeatureTreeDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(section);
}
private void createFeatureNodeSection(RootElement parent) {
- FeatureNodeDetailSection featureDistributionSection = formFactory.createFeatureNodeDetailSection(getConversationHolder(), parent, this, getSectionStyle(FeatureNodeDetailSection.class, true));
+ FeatureNodeDetailSection featureDistributionSection = formFactory.createFeatureNodeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FeatureNodeDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(featureDistributionSection);
}
private void createFeatureDistributionSection(RootElement parent) {
- FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, getSectionStyle(FeatureDistributionDetailSection.class, true));
+ FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(FeatureDistributionDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(featureDistributionSection);
}
private void createCharacterSection(RootElement parent) {
- CharacterDetailSection featureDistributionSection = formFactory.createCharacterDetailSection(getConversationHolder(), parent, this, getSectionStyle(CharacterDetailSection.class, true));
+ CharacterDetailSection featureDistributionSection = formFactory.createCharacterDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(CharacterDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(featureDistributionSection);
}
private void createPolytomousKeyNodeSection(RootElement parent) {
- PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, getSectionStyle(PolytomousKeyDetailSection.class));
+ 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, getSectionStyle(PolytomousKeyNodeDetailSection.class, true));
+ PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(PolytomousKeyNodeDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(polytomousKeyDetailSection);
addPart(polytomousKeyNodeDetailSection);
}
private void createUseRecordSection(RootElement parent) {
- UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,getSectionStyle(UseRecordDetailSection.class, true));
+ UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,StoreUtil.getSectionStyle(UseRecordDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
}
private void createUserSection(RootElement parent) {
- UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, getSectionStyle(UserDetailSection.class, true));
+ UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(UserDetailSection.class, getInput().getClass().getCanonicalName(), true));
- GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, getSectionStyle(GroupsByUserDetailSection.class, true));
+ GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(GroupsByUserDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(userDetailSection);
addPart(groupByUserDetailSection);
private void createMisappliedNameSection(RootElement parent) {
TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this,
- getSectionStyle(TaxonRelationshipDetailSection.class, true));
+ StoreUtil.getSectionStyle(TaxonRelationshipDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(taxonRelationshipDetailSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
NonViralNameDetailSection nonViralNameSection = formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
- getSectionStyle(NonViralNameDetailSection.class, true));
+ StoreUtil.getSectionStyle(NonViralNameDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(nonViralNameSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
- getSectionStyle(NomenclaturalReferenceDetailSection.class, true));
+ StoreUtil.getSectionStyle(NomenclaturalReferenceDetailSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(referenceDetailSection);
NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
- getSectionStyle(NomenclaturalStatusSection.class, true));
+ StoreUtil.getSectionStyle(NomenclaturalStatusSection.class, getInput().getClass().getCanonicalName(), true));
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(nomenclaturalStatusSection);
- ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, getSectionStyle(ProtologueSection.class));
+ 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, getSectionStyle(TypeDesignationSection.class));
+ 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, getSectionStyle(NameRelationshipDetailSection.class));
+ 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) {
- TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, getSectionStyle(TaxonRelationshipDetailSection.class, true));
+ TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TaxonRelationshipDetailSection.class, getInput().getClass().getCanonicalName(), true));
- ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, getSectionStyle(ReferencedEntityDetailSection.class, true));
+ ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(ReferencedEntityDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(taxonRelationshipDetailSection);
addPart(referencedEntityBaseDetailSection);
}
private void createTermVocabularySection(RootElement parent) {
- TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, getSectionStyle(TermVocabularyDetailSection.class, true));
+ TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, StoreUtil.getSectionStyle(TermVocabularyDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(termVocabularyDetailSection);
}
private void createDefinedTermSection(RootElement parent) {
- DefinedTermDetailSection definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, getSectionStyle(DefinedTermDetailSection.class, true));
+ 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, getSectionStyle(DefinedTermDetailSection.class, true));
+ TermMediaSection termMediaSection = formFactory.createTermMediaSection(getConversationHolder(), parent, StoreUtil.getSectionStyle(DefinedTermDetailSection.class, getInput().getClass().getCanonicalName(), true));
addPart(termMediaSection);
}
import eu.etaxonomy.taxeditor.model.IElementHasDetails;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
+import eu.etaxonomy.taxeditor.store.StoreUtil;
import eu.etaxonomy.taxeditor.ui.element.RootElement;
import eu.etaxonomy.taxeditor.ui.section.media.MediaSection;
import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection;
}
private void createSourceSection(RootElement parent){
- int expandStyle = getSectionStyle(SourceSection.class, false);
+ int expandStyle = StoreUtil.getSectionStyle(SourceSection.class, getInput().getClass().getCanonicalName(), false);
SourceSection sourceSection = formFactory.createSourceSection(getConversationHolder(), parent, expandStyle);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
addPart(sourceSection);
}
private void createAnnotationSections(RootElement parent) {
- int expandStyle = getSectionStyle(AnnotationSection.class, false);
+ int expandStyle = StoreUtil.getSectionStyle(AnnotationSection.class, getInput().getClass().getCanonicalName(), false);
AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), parent, expandStyle);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- expandStyle = getSectionStyle(MarkerSection.class, false);
+ expandStyle = StoreUtil.getSectionStyle(MarkerSection.class, getInput().getClass().getCanonicalName(), false);
MarkerSection markerSection = formFactory.createMarkerSection(getConversationHolder(), parent, expandStyle);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
}
private void createIdentifiableSections(RootElement parent) {
- int expandStyle = getSectionStyle(SourceSection.class, false);
+ int expandStyle = StoreUtil.getSectionStyle(SourceSection.class, getInput().getClass().getCanonicalName(), false);
SourceSection sourceSection = formFactory.createSourceSection(getConversationHolder(), parent, expandStyle);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- expandStyle = getSectionStyle(IdentifierSection.class, false);
+ expandStyle = StoreUtil.getSectionStyle(IdentifierSection.class, getInput().getClass().getCanonicalName(), false);
IdentifierSection identifierSection = formFactory.createIdentifierDetailSection(getConversationHolder(), parent, expandStyle);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- expandStyle = getSectionStyle(ExtensionSection.class, false);
+ expandStyle = StoreUtil.getSectionStyle(ExtensionSection.class, getInput().getClass().getCanonicalName(), false);
ExtensionSection extensionSection = formFactory.createExtensionSection(getConversationHolder(), parent, expandStyle);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- expandStyle = getSectionStyle(CreditSection.class, false);
+ expandStyle = StoreUtil.getSectionStyle(CreditSection.class, getInput().getClass().getCanonicalName(), false);
CreditSection creditSection = formFactory.createCreditSection(getConversationHolder(), parent, expandStyle);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- expandStyle = getSectionStyle(RightsSection.class, false);
+ expandStyle = StoreUtil.getSectionStyle(RightsSection.class, getInput().getClass().getCanonicalName(), false);
RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, expandStyle);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
}
private void createIdentifiableMediaSections(RootElement parent) {
- int expandStyle = getSectionStyle(MediaSection.class, false);
+ int expandStyle = StoreUtil.getSectionStyle(MediaSection.class, getInput().getClass().getCanonicalName(), false);
MediaSection mediaSection = formFactory.createMediaSection(getConversationHolder(), parent, expandStyle);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
}
private void createVersionSection(RootElement parent){
- VersionSection versionSection = formFactory.createVersionSection(parent, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED);
+ VersionSection versionSection = formFactory.createVersionSection(parent, ExpandableComposite.NO_TITLE | StoreUtil.getSectionStyle(VersionSection.class, getInput().getClass().getCanonicalName(), true));
addPart(versionSection);
}
private void createCdmBaseSection(RootElement parent) {
- CdmBaseSection cdmBaseSection = formFactory.createCdmBaseSection(parent, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED);
+ CdmBaseSection cdmBaseSection = formFactory.createCdmBaseSection(parent, ExpandableComposite.NO_TITLE | StoreUtil.getSectionStyle(CdmBaseSection.class, getInput().getClass().getCanonicalName(), true));
addPart(cdmBaseSection);
}