- completely removed EntityDetailType enum and all its uses
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / view / detail / DetailsViewer.java
index 4fe9b9f42a321474a6af11e2560d2f83d5eb0661..6ae7c256f320f4c935e4903a460f251953297d65 100644 (file)
@@ -48,7 +48,6 @@ import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType;
 import eu.etaxonomy.taxeditor.ui.element.RootElement;
 import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailSection;
@@ -262,8 +261,8 @@ public class DetailsViewer extends AbstractCdmDataViewer {
         destroySections();
 
         GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
-        MemberDetailSection memberDetailSection = (MemberDetailSection) formFactory.createEntityDetailSection(EntityDetailType.MEMBER, getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        GrantedAuthorityDetailSection grantedAuthorityDetailSection = (GrantedAuthorityDetailSection) formFactory.createEntityDetailSection(EntityDetailType.GRANTED_AUTHORITY, getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         addPart(groupDetailSection);
         addPart(memberDetailSection);
@@ -317,19 +316,19 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NomenclaturalStatusSection nomenclaturalStatusSection = (NomenclaturalStatusSection) formFactory.createEntityDetailSection(EntityDetailType.NOMENCLATURALSTATUS, getConversationHolder(), parent,ExpandableComposite.TWISTIE);
+        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        ProtologueSection protologSection = (ProtologueSection) formFactory.createEntityDetailSection(EntityDetailType.PROTOLOG, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        TypeDesignationSection typeDesignationSection = (TypeDesignationSection) formFactory.createEntityDetailSection(EntityDetailType.TYPEDESIGNATION, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NameRelationshipDetailSection nameRelationshipSection = (NameRelationshipDetailSection) formFactory.createEntityDetailSection(EntityDetailType.NAME_RELATIONSHIP, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -360,19 +359,19 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NomenclaturalStatusSection nomenclaturalStatusSection = (NomenclaturalStatusSection) formFactory.createEntityDetailSection(EntityDetailType.NOMENCLATURALSTATUS, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        ProtologueSection protologSection = (ProtologueSection) formFactory.createEntityDetailSection(EntityDetailType.PROTOLOG, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        TypeDesignationSection typeDesignationSection = (TypeDesignationSection) formFactory.createEntityDetailSection(EntityDetailType.TYPEDESIGNATION, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        NameRelationshipDetailSection nameRelationshipSection = (NameRelationshipDetailSection) formFactory.createEntityDetailSection(EntityDetailType.NAME_RELATIONSHIP, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -444,11 +443,11 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescriptionElementSourceSection descriptionElementSourceSection = (DescriptionElementSourceSection) formFactory.createEntityDetailSection(EntityDetailType.DESCRIPTIONELEMENTSOURCE, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescriptionElementMediaSection descriptionElementMediaSection = (DescriptionElementMediaSection) formFactory.createEntityDetailSection(EntityDetailType.DESCRIPTIONELEMENTMEDIA, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -472,15 +471,15 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescribedSpecimenSection describedSpecimenSection = (DescribedSpecimenSection) formFactory.createEntityDetailSection(EntityDetailType.DESCRIBED_SPECIMEN, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory.createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        ScopeSection scopeSection = (ScopeSection) formFactory.createEntityDetailSection(EntityDetailType.SCOPE, getConversationHolder(), parent, ExpandableComposite.TWISTIE);
+        ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -502,7 +501,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory.createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE, getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
@@ -594,7 +593,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         formFactory.createHorizontalSeparator(parent, SWT.BORDER);
 
-        TaxonomicScopeSection taxonomicScopeSection = (TaxonomicScopeSection) formFactory.createEntityDetailSection(EntityDetailType.TAXONOMIC_SCOPE, getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
+        TaxonomicScopeSection taxonomicScopeSection = formFactory.createTaxonomicScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.COMPACT);
 
         addPart(polytomousKeyDetailSection);
         addPart(polytomousKeyNodeDetailSection);
@@ -628,7 +627,7 @@ public class DetailsViewer extends AbstractCdmDataViewer {
 
         UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
-        GroupsByUserDetailSection groupByUserDetailSection = (GroupsByUserDetailSection) formFactory.createEntityDetailSection(EntityDetailType.GROUPS_BY_USER, getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
+        GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
 
         addPart(userDetailSection);
         addPart(groupByUserDetailSection);