Date: Tue, 13 Sep 2016 09:27:51 +0000 (+0200)
Subject: fix #6059 Save expand state for details view, supplemental view
X-Git-Tag: 4.3.0^2~40
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/38eaa3c8c34ceeb65e29b7647a4bba1696e7ed4e
fix #6059 Save expand state for details view, supplemental view
including sub sections
---
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java
index 1ef071eac..009c0b9ab 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/AbstractFormSection.java
@@ -26,6 +26,8 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.TypedListener;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.events.IExpansionListener;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.forms.widgets.TableWrapLayout;
import org.eclipse.ui.forms.widgets.ToggleHyperlink;
@@ -35,6 +37,7 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
/**
*
@@ -165,6 +168,7 @@ public abstract class AbstractFormSection extends Section implements ISe
*/
public void setEntity(ENTITY entity) {
this.entity = entity;
+ addExpandListener();
}
/*
@@ -591,11 +595,34 @@ public abstract class AbstractFormSection extends Section implements ISe
}
/** {@inheritDoc} */
-
@Override
public void update(CdmDataChangeMap changeEvents) {
}
+
+ private class ExpandListener implements IExpansionListener{
+ @Override
+ public void expansionStateChanging(ExpansionEvent e) {
+ }
+ @Override
+ public void expansionStateChanged(ExpansionEvent e) {
+ PreferencesUtil.getPreferenceStore().setValue(getPrefKey(), e.getState());
+ }
+ }
+
+ /**
+ * Adds a custom implementation of IExpansionListener to this section
+ * which stores the expansion state in the preferences
+ */
+ private void addExpandListener() {
+ PreferencesUtil.getPreferenceStore().setDefault(getPrefKey(), isExpanded());
+ setExpanded(PreferencesUtil.getPreferenceStore().getBoolean(getPrefKey()));
+ addExpansionListener(new ExpandListener());
+ }
+
+ private String getPrefKey() {
+ return this.getClass().getCanonicalName()+";"+entity.getClass().getCanonicalName();
+ }
}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmDataViewer.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmDataViewer.java
index fb2115792..d1cef126d 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmDataViewer.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmDataViewer.java
@@ -17,15 +17,10 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.forms.IFormPart;
import org.eclipse.ui.forms.ManagedForm;
-import org.eclipse.ui.forms.events.ExpansionEvent;
-import org.eclipse.ui.forms.events.IExpansionListener;
import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.Section;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
@@ -177,13 +172,10 @@ public abstract class AbstractCdmDataViewer extends Viewer implements IConversat
formFactory.removePropertyChangeListener(sectionPart);
}
- protected void addPart(AbstractFormSection> section, boolean isDefaultExpanded){
+ protected void addPart(AbstractFormSection> section){
CdmSectionPart> sectionPart = new CdmSectionPart<>(section);
managedForm.addPart(sectionPart);
formFactory.addPropertyChangeListener(sectionPart);
- PreferencesUtil.getPreferenceStore().setDefault(section.getClass().getCanonicalName()+";"+getInput().getClass().getCanonicalName(), isDefaultExpanded);
- section.setExpanded(PreferencesUtil.getPreferenceStore().getBoolean(section.getClass().getCanonicalName()+";"+getInput().getClass().getCanonicalName()));
- section.addExpansionListener(new ExpandListener(section));
}
@Override
@@ -191,28 +183,4 @@ public abstract class AbstractCdmDataViewer extends Viewer implements IConversat
return viewPart.getConversationHolder();
}
- /** {@inheritDoc} */
- @Override
- public void update(CdmDataChangeMap changeEvents) {}
-
- private class ExpandListener implements IExpansionListener{
-
- private Section section;
-
- public ExpandListener(Section section) {
- super();
- this.section = section;
- }
-
- @Override
- public void expansionStateChanging(ExpansionEvent e) {
- }
-
- @Override
- public void expansionStateChanged(ExpansionEvent e) {
- PreferencesUtil.getPreferenceStore().setValue(section.getClass().getCanonicalName()+";"+getInput().getClass().getCanonicalName(), e.getState());
- }
-
- }
-
}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
index 79f8a19d2..2a12e89b0 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java
@@ -48,6 +48,7 @@ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
import eu.etaxonomy.cdm.model.reference.Reference;
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
+import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.AbstractUtility;
import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
@@ -327,7 +328,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
EmptySection emptySection = formFactory.createEmptySection(formFactory, parent, SWT.NONE);
- addPart(emptySection, false);
+ addPart(emptySection);
}
private void createGroupSection(RootElement parent) {
@@ -337,9 +338,9 @@ public class DetailsViewer extends AbstractCdmDataViewer {
MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(groupDetailSection, true);
- addPart(memberDetailSection, true);
- addPart(grantedAuthorityDetailSection, true);
+ addPart(groupDetailSection);
+ addPart(memberDetailSection);
+ addPart(grantedAuthorityDetailSection);
}
/** {@inheritDoc} */
@@ -368,7 +369,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(taxonBaseDetailSection, true);
+ addPart(taxonBaseDetailSection);
}
NonViralNameDetailSection nonViralNameSection = formFactory
.createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
@@ -383,8 +384,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(nomenclaturalStatusSection, true);
- addPart(referenceDetailSection, true);
+ addPart(nomenclaturalStatusSection);
+ addPart(referenceDetailSection);
}
//TODO RL
if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL) && !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
@@ -397,14 +398,14 @@ public class DetailsViewer extends AbstractCdmDataViewer {
NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(protologSection, false);
- addPart(typeDesignationSection, false);
- addPart(nameRelationshipSection, false);
+ addPart(protologSection);
+ addPart(typeDesignationSection);
+ addPart(nameRelationshipSection);
}
- addPart(parsingMessagesSection, true);
+ addPart(parsingMessagesSection);
- addPart(nonViralNameSection, true);
+ addPart(nonViralNameSection);
}
@@ -423,9 +424,9 @@ public class DetailsViewer extends AbstractCdmDataViewer {
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(nonViralNameSection, true);
- addPart(nomenclaturalStatusSection, true);
- addPart(referenceDetailSection, true);
+ addPart(nonViralNameSection);
+ addPart(nomenclaturalStatusSection);
+ addPart(referenceDetailSection);
//TODO RL
if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.IS_RL)){
ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
@@ -436,9 +437,9 @@ public class DetailsViewer extends AbstractCdmDataViewer {
NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(protologSection, false);
- addPart(typeDesignationSection, false);
- addPart(nameRelationshipSection, false);
+ addPart(protologSection);
+ addPart(typeDesignationSection);
+ addPart(nameRelationshipSection);
}
}
@@ -448,27 +449,27 @@ public class DetailsViewer extends AbstractCdmDataViewer {
ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(referenceDetailSection, true);
+ addPart(referenceDetailSection);
}
private void createTeamOrPersonBaseDetailSection(RootElement parent) {
destroySections();
TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(teamOrPersonBaseDetailSection, true);
+ addPart(teamOrPersonBaseDetailSection);
}
private void createTeamDetailSection(RootElement parent) {
destroySections();
TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(teamDetailSection, true);
+ addPart(teamDetailSection);
}
private void createPersonDetailSection(RootElement parent) {
destroySections();
PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(personDetailSection, true);
+ addPart(personDetailSection);
}
private void createDescriptionElementSection(RootElement parent) {
@@ -486,9 +487,9 @@ public class DetailsViewer extends AbstractCdmDataViewer {
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(descriptionElementDetailSection, true);
- addPart(descriptionElementSourceSection, false);
- addPart(descriptionElementMediaSection, false);
+ addPart(descriptionElementDetailSection);
+ addPart(descriptionElementSourceSection);
+ addPart(descriptionElementMediaSection);
}
private void createDescriptionSection(RootElement parent) {
@@ -515,17 +516,17 @@ public class DetailsViewer extends AbstractCdmDataViewer {
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(descriptionDetailSection, true);
- addPart(naturalLanguageSection, true);
+ addPart(descriptionDetailSection);
+ addPart(naturalLanguageSection);
// addPart(describedSpecimenSection);
// addPart(descriptionSourceSection);
- addPart(scopeSection, false);
+ addPart(scopeSection);
}
private void createSpecimenDescriptionSection(RootElement parent) {
destroySections();
DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(descriptionDetailSection, true);
+ addPart(descriptionDetailSection);
}
private void createUseDescriptionSection(RootElement parent) {
@@ -538,8 +539,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(descriptionDetailSection, true);
- addPart(descriptionSourceSection, true);
+ addPart(descriptionDetailSection);
+ addPart(descriptionSourceSection);
}
@@ -547,7 +548,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
destroySections();
DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(descriptionDetailSection, true);
+ addPart(descriptionDetailSection);
}
private void createMediaElementSection(RootElement parent) {
@@ -555,7 +556,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(mediaDetailSection, true);
+ addPart(mediaDetailSection);
}
private void createDerivedUnitBaseElementSection(RootElement parent) {
@@ -566,43 +567,43 @@ public class DetailsViewer extends AbstractCdmDataViewer {
if(!(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart)){
derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
}
- addPart(derivedUnitGeneralDetailSection, true);
+ addPart(derivedUnitGeneralDetailSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(derivedUnitBaseDetailSection, true);
+ addPart(derivedUnitBaseDetailSection);
//for editors working with facades
if(AbstractUtility.getActivePart() instanceof IDerivedUnitFacadePart){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(gatheringEventDetailSection, false);
+ addPart(gatheringEventDetailSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(fieldUnitDetailSection, false);
+ addPart(fieldUnitDetailSection);
}
else{
if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(taxonAssociationDetailSection, true);
+ addPart(taxonAssociationDetailSection);
}
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- addPart(identifierDetailSection, false);
+ addPart(identifierDetailSection);
}
if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(determinationDetailSection, false);
+ addPart(determinationDetailSection);
}
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(derivedUnitTypeDesignationSection, false);
+ addPart(derivedUnitTypeDesignationSection);
}
@@ -619,14 +620,14 @@ public class DetailsViewer extends AbstractCdmDataViewer {
FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(fielUnitGeneralDetailSection, true);
- addPart(gatheringEventDetailSection, false);
- addPart(fieldUnitDetailSection, false);
+ addPart(fielUnitGeneralDetailSection);
+ addPart(gatheringEventDetailSection);
+ addPart(fieldUnitDetailSection);
if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
- addPart(determinationDetailSection, false);
+ addPart(determinationDetailSection);
}
}
@@ -639,8 +640,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(section, true);
- addPart(sampleDesignationDetailSection, true);
+ addPart(section);
+ addPart(sampleDesignationDetailSection);
}
private void createDnaSampleSection(RootElement parent) {
@@ -660,10 +661,10 @@ public class DetailsViewer extends AbstractCdmDataViewer {
SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(section, true);
- addPart(preparationPreservationSection, true);
- addPart(qualitySection, true);
- addPart(sampleDesignationDetailSection, true);
+ addPart(section);
+ addPart(preparationPreservationSection);
+ addPart(qualitySection);
+ addPart(sampleDesignationDetailSection);
}
private void createSequenceSection(RootElement parent) {
@@ -680,21 +681,21 @@ public class DetailsViewer extends AbstractCdmDataViewer {
SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(section, true);
- addPart(referenceSection, true);
- addPart(contigFileSection, true);
+ addPart(section);
+ addPart(referenceSection);
+ addPart(contigFileSection);
}
private void createSingleReadSection(RootElement parent) {
destroySections();
SingleReadGeneralDetailSection section = formFactory.createSingleReadGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(section, true);
+ addPart(section);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(pherogramSection, true);
+ addPart(pherogramSection);
}
@@ -702,12 +703,12 @@ public class DetailsViewer extends AbstractCdmDataViewer {
destroySections();
MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(generalSection, true);
+ addPart(generalSection);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- addPart(rightsSection, false);
+ addPart(rightsSection);
}
@@ -716,7 +717,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(featureDistributionSection, true);
+ addPart(featureDistributionSection);
}
private void createPolytomousKeyNodeSection(RootElement parent) {
@@ -728,8 +729,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(polytomousKeyDetailSection, true);
- addPart(polytomousKeyNodeDetailSection, true);
+ addPart(polytomousKeyDetailSection);
+ addPart(polytomousKeyNodeDetailSection);
}
@@ -740,7 +741,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(descriptionUseRecordSection, true);
+ addPart(descriptionUseRecordSection);
}
@@ -752,8 +753,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(userDetailSection, true);
- addPart(groupByUserDetailSection, true);
+ addPart(userDetailSection);
+ addPart(groupByUserDetailSection);
}
private void createTaxonRelationshipSection(RootElement parent) {
@@ -762,22 +763,27 @@ public class DetailsViewer extends AbstractCdmDataViewer {
TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(taxonRelationshipDetailSection, true);
- addPart(referencedEntityBaseDetailSection, true);
+ addPart(taxonRelationshipDetailSection);
+ addPart(referencedEntityBaseDetailSection);
}
private void createTermVocabularySection(RootElement parent) {
destroySections();
TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(termVocabularyDetailSection, true);
+ addPart(termVocabularyDetailSection);
}
private void createDefinedTermSection(RootElement parent) {
destroySections();
AbstractFormSection> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
- addPart(definedTermDetailSection, true);
+ addPart(definedTermDetailSection);
}
+ @Override
+ public void update(CdmDataChangeMap arg0) {
+
+ }
+
}
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java
index 4cd8d0601..17630b9ea 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java
@@ -22,6 +22,7 @@ import eu.etaxonomy.cdm.model.common.AnnotatableEntity;
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
import eu.etaxonomy.cdm.model.common.VersionableEntity;
import eu.etaxonomy.cdm.model.media.IdentifiableMediaEntity;
+import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
import eu.etaxonomy.taxeditor.model.IElementHasDetails;
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
@@ -131,7 +132,7 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
private void createHeadlineSection(RootElement parent){
HeadlineSection headlineSection = formFactory.createHeadlineSection(parent);
- addPart(headlineSection, false);
+ addPart(headlineSection);
}
private void createAnnotationSections(RootElement parent) {
@@ -143,8 +144,8 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(annotationSection, false);
- addPart(markerSection, false);
+ addPart(annotationSection);
+ addPart(markerSection);
}
private void createIdentifiableSections(RootElement parent) {
@@ -166,11 +167,11 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
IdentifierSection identifierSection = formFactory.createIdentifierDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
- addPart(creditSection, false);
- addPart(extensionSection, false);
- addPart(rightsSection, false);
- addPart(sourceSection, false);
- addPart(identifierSection, false);
+ addPart(creditSection);
+ addPart(extensionSection);
+ addPart(rightsSection);
+ addPart(sourceSection);
+ addPart(identifierSection);
}
@@ -179,12 +180,12 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- addPart(mediaSection, false);
+ addPart(mediaSection);
}
private void createVersionSection(RootElement parent){
VersionSection versionSection = formFactory.createVersionSection(parent, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED);
- addPart(versionSection, true);
+ addPart(versionSection);
}
/**
@@ -193,7 +194,7 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
private void createCdmBaseSection(RootElement parent) {
CdmBaseSection cdmBaseSection = formFactory.createCdmBaseSection(parent, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED);
- addPart(cdmBaseSection, true);
+ addPart(cdmBaseSection);
}
/*
@@ -213,4 +214,8 @@ public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISe
setInput(selection.getFirstElement());
}
}
+
+ @Override
+ public void update(CdmDataChangeMap arg0) {
+ }
}