ref #6913 Remove details and supplemental view
authorPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 4 May 2018 13:27:48 +0000 (15:27 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 4 May 2018 13:30:13 +0000 (15:30 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/DescriptiveViewPart.java
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewPart.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewer.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/e4/details/DetailsViewerE4.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewPart.java [deleted file]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewer.java [deleted file]

index ec7e1c6ab8e78dc44ba596188e0c8a0df9537b02..8f9579832ee19abaaa4b348da64d858095cc7a7d 100644 (file)
@@ -57,8 +57,6 @@ import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
 import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
-import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
-import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart;
 import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
 
 /**
@@ -175,8 +173,7 @@ public class DescriptiveViewPart extends AbstractCdmEditorViewPart implements IP
                    return;
                }
 
-        if (partObject instanceof DetailsViewPart || partObject instanceof SupplementalDataViewPart
-                || partObject instanceof MediaViewPartE4) {
+        if (partObject instanceof MediaViewPartE4) {
             // do not show empty page as these views are also used to edit the
             // description selected in this view
             return;
index 0258d49b33aeed195ecd4ecf1b637e8576a177b1..e84a9ddf83987cacb717e65d981b25787264fbd7 100644 (file)
@@ -69,7 +69,6 @@ Export-Package: eu.etaxonomy.cdm,
  eu.etaxonomy.taxeditor.view.e4.details,
  eu.etaxonomy.taxeditor.view.e4.supplementaldata,
  eu.etaxonomy.taxeditor.view.specimenSearch,
- eu.etaxonomy.taxeditor.view.supplementaldata,
  org.eclipse.wb.swt
 Require-Bundle: org.eclipse.osgi,
  org.eclipse.ui,
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewPart.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/detail/DetailsViewPart.java
deleted file mode 100644 (file)
index 6390e8f..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.view.detail;
-
-import java.util.Collection;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.e4.ui.model.application.ui.basic.MPart;
-import org.eclipse.e4.ui.workbench.modeling.EPartService;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TreeNode;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.internal.e4.compatibility.CompatibilityPart;
-
-import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
-import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.description.Feature;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-import eu.etaxonomy.taxeditor.editor.ITaxonEditor;
-import eu.etaxonomy.taxeditor.l10n.Messages;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
-import eu.etaxonomy.taxeditor.model.IContextListener;
-import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
-import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
-import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
-import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
-import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
-
-/**
- * <p>DetailsViewPart class.</p>
- *
- * @author n.hoffmann
- * @created Jun 10, 2010
- * @version 1.0
- */
-public class DetailsViewPart extends AbstractCdmEditorViewPart implements IPartContentHasSupplementalData, IContextListener{
-
-       /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.forms.det"{trunked}</code> */
-       public static String ID = "eu.etaxonomy.taxeditor.view.detail"; //$NON-NLS-1$
-
-       private DetailsViewer viewer;
-
-       private CdmBase lastObject;
-       private Object lastPart;
-
-       /** {@inheritDoc} */
-       @Override
-       public void createViewer(Composite parent) {
-
-               viewer = new DetailsViewer(parent, this);
-               getSite().setSelectionProvider(viewer);
-       }
-
-       @Override
-    protected void selectionChanged_internal(IWorkbenchPart workbenchPart, ISelection selection){
-           Object partObject = workbenchPart;
-           Object wrappedPart = WorkbenchUtility.getE4WrappedPart(partObject);
-           if(wrappedPart!=null){
-               partObject = wrappedPart;
-           }
-           if(AbstractUtility.getActiveEditor() == null && !(AbstractUtility.getActivePart() instanceof IConversationEnabled)){
-            showEmptyPage();
-            return;
-        }
-
-           //special case where the details view still open with details about the closed object #5495
-           try{
-               boolean isSelectionProvidingPartStillActive = false;
-               if(selectionProvidingPart!=null){
-                   EPartService partService = TaxeditorStorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getService(EPartService.class);
-                   Collection<MPart> parts = partService.getParts();
-                   for (MPart mPart : parts) {
-                       Object object = mPart.getObject();
-                       if(object instanceof CompatibilityPart){
-                           object = ((CompatibilityPart) object).getPart();
-                       }
-                       if(selectionProvidingPart.equals(object)){
-                           isSelectionProvidingPartStillActive = true;
-                           break;
-                       }
-                   }
-                   if(!isSelectionProvidingPartStillActive &&
-                           selection instanceof IStructuredSelection && ((IStructuredSelection) selection).getFirstElement() !=null){
-                       showEmptyPage();
-                       return;
-                   }
-               }
-           }catch(IllegalStateException e){
-               //nothing
-           }
-
-           if(partObject == this){
-               return;
-           }
-
-        if(!(selection instanceof IStructuredSelection)){
-            return;
-        }
-
-        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-
-        if((partObject instanceof IEditorPart) || (partObject instanceof IPartContentHasDetails)) {
-            if(structuredSelection.size() != 1){
-                showEmptyPage();
-                return;
-            }
-
-            // do not show details for feature nodes TODO really?
-            if(structuredSelection.getFirstElement() instanceof FeatureNodeContainer){
-                // do show the map for distributions
-                Feature feature = ((FeatureNodeContainer) ((IStructuredSelection) selection).getFirstElement()).getFeature();
-                if(!feature.equals(Feature.DISTRIBUTION())){
-                    showEmptyPage();
-                    return;
-                }
-            }
-            showViewer(partObject, structuredSelection);
-        }else{
-            showEmptyPage();
-        }
-       }
-
-       @Override
-       protected String getViewName(){
-           return Messages.DetailsViewPart_VIEWER_NAME;
-       }
-
-       @Override
-       protected String createPartTitle(Object selectedObject){
-           if(selectedObject!=null){
-               if(selectedObject instanceof TreeNode){
-                   selectedObject = ((TreeNode) selectedObject).getValue();
-               }
-               if(selectedObject instanceof SpecimenOrObservationBase){
-                   return getViewName()+": "+HibernateProxyHelper.deproxy(selectedObject, SpecimenOrObservationBase.class).getRecordBasis(); //$NON-NLS-1$
-               }
-               if(selectedObject instanceof CdmBase){
-                   return getViewName()+": "+HibernateProxyHelper.deproxy(selectedObject, CdmBase.class).getClass().getSimpleName(); //$NON-NLS-1$
-               }
-               return getViewName()+": "+selectedObject.getClass().getSimpleName(); //$NON-NLS-1$
-           }
-           return getViewName();
-       }
-
-       @Override
-       public void showEmptyPage() {
-           viewer.setSelection(null);
-
-           super.showEmptyPage();
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public boolean postOperation(CdmBase objectAffectedByOperation) {
-
-               viewer.setInput(objectAffectedByOperation);
-
-               return super.postOperation(objectAffectedByOperation);
-       }
-
-
-       /** {@inheritDoc} */
-       @Override
-       public Viewer getViewer() {
-               return viewer;
-       }
-
-
-       /** {@inheritDoc} */
-       @Override
-       public void dispose() {
-               selectionService.removePostSelectionListener(this);
-               super.dispose();
-
-       }
-
-       @Override
-    public boolean onComplete() {
-               return true;
-       }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void contextAboutToStop(IMemento memento, IProgressMonitor monitor) {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void contextStop(IMemento memento, IProgressMonitor monitor) {
-        showEmptyPage();
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void contextStart(IMemento memento, IProgressMonitor monitor) {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void contextRefresh(IProgressMonitor monitor) {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    public void workbenchShutdown(IMemento memento, IProgressMonitor monitor) {
-    }
-    @Override
-    public void showViewer(Object part, IStructuredSelection selection){
-
-
-
-       this.part = part;
-
-        Object element = selection.getFirstElement();
-
-//        if (part == lastPart && element == lastObject ){
-//             getViewer().setInput(element);
-//             return;
-//        }else{
-//             lastPart = part;
-//             if (element instanceof CdmBase){
-//                     lastObject = (CdmBase)element;
-//             }else{
-//                     lastObject = null;
-//             }
-//        }
-      //avoid widget is disposed exceptions
-        if (getViewer().getControl()==null || getViewer().getControl().isDisposed() ){
-            return;
-        }
-
-        setPartName(createPartTitle(element));
-        if (element instanceof Taxon){
-               Taxon taxon = HibernateProxyHelper.deproxy(element, Taxon.class);
-               if (taxon.isMisapplication()){
-
-                       if (part instanceof ITaxonEditor){
-                               Taxon accepted= ((ITaxonEditor)part).getTaxon();
-                               Set<TaxonRelationship> rels =  taxon.getTaxonRelations(accepted);
-
-                                if (rels.iterator().hasNext()){
-                                        TaxonRelationship rel = rels.iterator().next();
-                                        if (rel.getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())){
-                                                getViewer().setInput(rel);
-                                                showViewer();
-                                                return;
-                                        }
-                                }
-                       }
-
-
-               }
-        }
-        if (element instanceof Object[] && ((Object[])element).length == 0){
-               return;
-        }
-        getViewer().setInput(element);
-        super.showViewer(part, selection);
-    }
-}
-
-
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
deleted file mode 100755 (executable)
index efe1b92..0000000
+++ /dev/null
@@ -1,857 +0,0 @@
-/**
- * Copyright (C) 2011 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.view.detail;
-
-import java.util.Set;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeNode;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
-import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.cdm.api.facade.DerivedUnitFacadeNotSupportedException;
-import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
-import eu.etaxonomy.cdm.model.agent.Person;
-import eu.etaxonomy.cdm.model.agent.Team;
-import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase;
-import eu.etaxonomy.cdm.model.common.DefinedTermBase;
-import eu.etaxonomy.cdm.model.common.Group;
-import eu.etaxonomy.cdm.model.common.Marker;
-import eu.etaxonomy.cdm.model.common.TermVocabulary;
-import eu.etaxonomy.cdm.model.common.User;
-import eu.etaxonomy.cdm.model.description.CategoricalData;
-import eu.etaxonomy.cdm.model.description.DescriptionBase;
-import eu.etaxonomy.cdm.model.description.DescriptionElementBase;
-import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.cdm.model.description.SpecimenDescription;
-import eu.etaxonomy.cdm.model.media.Media;
-import eu.etaxonomy.cdm.model.molecular.DnaSample;
-import eu.etaxonomy.cdm.model.molecular.Sequence;
-import eu.etaxonomy.cdm.model.molecular.SingleRead;
-import eu.etaxonomy.cdm.model.name.TaxonName;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
-import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
-import eu.etaxonomy.cdm.model.occurrence.MediaSpecimen;
-import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationType;
-import eu.etaxonomy.cdm.model.reference.Reference;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
-import eu.etaxonomy.taxeditor.model.IDerivedUnitFacadePart;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.model.PolytomousKeyRelationship;
-import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
-import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
-import eu.etaxonomy.taxeditor.store.UsageTermCollection;
-import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.element.RootElement;
-import eu.etaxonomy.taxeditor.ui.section.agent.PersonDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.agent.TeamDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.agent.TeamOrPersonBaseDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.common.ReferencedEntityDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.description.DescriptionDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementMediaSection;
-import eu.etaxonomy.taxeditor.ui.section.description.DescriptionElementSourceSection;
-import eu.etaxonomy.taxeditor.ui.section.description.DescriptionSourceSection;
-import eu.etaxonomy.taxeditor.ui.section.description.MediaDetailsSection;
-import eu.etaxonomy.taxeditor.ui.section.description.NaturalLanguageSection;
-import eu.etaxonomy.taxeditor.ui.section.description.ScopeSection;
-import eu.etaxonomy.taxeditor.ui.section.feature.FeatureDistributionDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.grantedAuthority.GrantedAuthorityDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.name.NameRelationshipDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.name.NomenclaturalStatusSection;
-import eu.etaxonomy.taxeditor.ui.section.name.NonViralNameDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.name.ProtologueSection;
-import eu.etaxonomy.taxeditor.ui.section.name.TypeDesignationSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.EmptySection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.association.DerivedUnitTypeDesignationSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSamplePreparationPreservationSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceContigFileCollectionDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceReferenceCollectionDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadGeneralDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadPherogramCollectionDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.identifier.DerivedUnitFacadeIdentifierSection;
-import eu.etaxonomy.taxeditor.ui.section.taxon.ParsingMessagesSection;
-import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonBaseDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.taxon.TaxonRelationshipDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
-import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer;
-import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
-
-/**
- *
- * The DetailsViewer handles the content of the details view (
- * {@link DetailsViewPart}).<br>
- * Depending on the type of the selected element the section of the details view
- * are created.
- *
- * @author n.hoffmann
- * @created Feb 12, 2010
- * @version 1.0
- */
-public class DetailsViewer extends AbstractCdmDataViewer {
-
-    private ISelection selection;
-
-    public DetailsViewer(Composite parent, AbstractCdmViewPart viewPart) {
-        super(parent, viewPart);
-    }
-
-    // START HACK TO MAKE THE DERIVED UNIT FACADE WORK
-    // since we are getting implementations of DerivedUnitBase from the bulk
-    // editor
-    // and not derived unit facade objects,
-
-    @Override
-    public void setInput(Object input) {
-
-        if(input instanceof TreeNode){
-            input = ((TreeNode) input).getValue();
-        }
-        if(input instanceof GbifResponse){
-            input = ((GbifResponse) input).getDerivedUnitFacade();
-        }
-        if (input.getClass().equals(DerivedUnit.class)) {
-            DerivedUnit derivedUnit = (DerivedUnit)input;
-            try {
-                input = DerivedUnitFacade.NewInstance(derivedUnit,
-                        PreferencesUtil.getDerivedUnitConfigurator());
-            } catch (DerivedUnitFacadeNotSupportedException e) {
-//                MessagingUtils.error(getClass(), e); //nothing should happen, later on the Details View will show an according information that it is not possible to open this data
-            }
-        }
-        else if(input instanceof FieldUnit){
-            input = DerivedUnitFacade.NewInstance(SpecimenOrObservationType.FieldUnit, (FieldUnit) input);
-        }
-        super.setInput(input);
-    }
-
-    @Override
-    protected void markViewPartDirty() {
-        if (getInput() instanceof DerivedUnitFacade) {
-            DerivedUnitFacade facade = (DerivedUnitFacade) getInput();
-            if(facade.innerDerivedUnit()!=null){
-                getViewPart().changed(facade.innerDerivedUnit());
-            }
-            else if(facade.innerFieldUnit()!=null){
-                getViewPart().changed(facade.innerFieldUnit());
-            }
-        }
-        else{
-            super.markViewPartDirty();
-        }
-    }
-
-    // END HACK TO MAKE THE DERIVED UNIT FACADE WORK
-
-
-    /** {@inheritDoc} */
-    @Override
-    protected void showParts() {
-        // FIXME (CM) : Need to clean out this code.
-        // Too much type checking to decide which detail view to display.
-        // Need to build in a mechanism where navigators / editors are 'aware'
-        // of the corresponding detail viewer.
-
-        Object input = getInput();
-
-        destroySections();
-        if (input instanceof TaxonBase) {
-            if(((TaxonBase) input).getName()==null){
-                createEmptySection(rootElement);
-            }
-            else{
-                createTaxonSections(rootElement);
-            }
-
-        } else if (input instanceof TaxonName) {
-            createNameSections(rootElement);
-
-        } else if (input instanceof Reference) {
-            createReferenceSections(rootElement);
-
-        } else if (input instanceof Team) {
-            createTeamDetailSection(rootElement);
-
-        } else if (input instanceof Person) {
-            createPersonDetailSection(rootElement);
-
-        } else if (input instanceof TeamOrPersonBase) {
-            createTeamOrPersonBaseDetailSection(rootElement);
-
-        } else if (input instanceof DescriptionBase) {
-            if(input instanceof SpecimenDescription){
-                //TODO: add more sections to DetailsView for SpecimenDescription
-                createSpecimenDescriptionSection(rootElement);
-            }
-            else{
-                Set<Marker> descriptionMarkers = ((DescriptionBase<?>) input).getMarkers();
-
-                Boolean isUseDescription = false;
-                for (Marker marker : descriptionMarkers) {
-                    if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
-                        isUseDescription = true;
-                    }
-                }
-                if (((DescriptionBase<?>) input).isImageGallery()) {
-                    createImageGallerySection(rootElement);
-
-                } else if (isUseDescription) {
-                    createUseDescriptionSection(rootElement);
-                } else {
-                    createDescriptionSection(rootElement);
-
-                }
-            }
-        } else if (input instanceof DescriptionElementBase) {
-            Set<Marker> descriptionMarkers = ((DescriptionElementBase) input).getInDescription().getMarkers();
-
-            Boolean isUseDescription = false;
-            for (Marker marker : descriptionMarkers) {
-                if (marker.getMarkerType()!= null && marker.getMarkerType().getUuid().equals(UsageTermCollection.uuidUseMarkerType)) {
-                    isUseDescription = true;
-                }
-            }
-
-            if (isUseDescription == true && input instanceof CategoricalData) {
-                createUseRecordSection(rootElement);
-            } else {
-                createDescriptionElementSection(rootElement);
-            }
-
-        } else if (input instanceof Media) {
-            createMediaElementSection(rootElement);
-
-        } else if (input instanceof DerivedUnitFacade) {
-            if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.FieldUnit){
-                if(((DerivedUnitFacade) input).innerFieldUnit()==null){
-                    MessagingUtils.error(DetailsViewer.class, "FieldUnit of facade is null", null);
-                }
-                else{
-                    createFieldUnitSection(rootElement);
-                }
-            }
-            else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.PreservedSpecimen){
-                if(((DerivedUnitFacade) input).innerDerivedUnit()==null){
-                    MessagingUtils.error(DetailsViewer.class, "DerivedUnit of facade is null", null);
-                }
-                else{
-                    createDerivedUnitBaseElementSection(rootElement);
-                }
-            }
-            else if(((DerivedUnitFacade) input).getType()==SpecimenOrObservationType.TissueSample){
-                //TissueSample should only be created by using it's own class
-                //in future using only one class with different SpecimenOrObservationTypes is desired
-                createTissueSampleSection(rootElement);
-            }
-            else{
-                createDerivedUnitBaseElementSection(rootElement);
-            }
-        } else if (input instanceof DnaSample){
-            DnaSample dnaSample = (DnaSample)input;
-            if(dnaSample.getRecordBasis()==SpecimenOrObservationType.TissueSample){
-                createTissueSampleSection(rootElement);
-            }
-            else if(dnaSample.getRecordBasis()==SpecimenOrObservationType.DnaSample){
-                createDnaSampleSection(rootElement);
-            }
-        } else if (input instanceof MediaSpecimen){
-            createMediaSpecimenSection(rootElement);
-        }
-        else if(input instanceof Sequence){
-            createSequenceSection(rootElement);
-        }
-        else if(input instanceof SingleRead){
-            createSingleReadSection(rootElement);
-        }
-        else if (input instanceof FeatureNodeContainer) {
-            createFeatureDistributionSection(rootElement);
-
-        }else if ((input instanceof PolytomousKeyNode) || (input instanceof PolytomousKeyRelationship)) {
-            createPolytomousKeyNodeSection(rootElement);
-        } else if (input instanceof User) {
-            createUserSection(rootElement);
-        } else if (input instanceof Group) {
-            createGroupSection(rootElement);
-        } else if (input instanceof TaxonRelationship && ((TaxonRelationship)input).getType().equals(TaxonRelationshipType.MISAPPLIED_NAME_FOR())) {
-            createMisappliedNameSection(rootElement);
-        }else if (input instanceof TaxonRelationship ) {
-            createTaxonRelationshipSection(rootElement);
-        } else if (input instanceof TermVocabulary) {
-            createTermVocabularySection(rootElement);
-        } else if (input instanceof DefinedTermBase) {
-            createDefinedTermSection(rootElement);
-        }
-        else {
-            createEmptySection(rootElement);
-        }
-        layout();
-
-    }
-
-
-    private void createEmptySection(RootElement parent) {
-        destroySections();
-
-        EmptySection emptySection = formFactory.createEmptySection(formFactory, parent, SWT.NONE);
-
-        addPart(emptySection);
-    }
-
-    private void createGroupSection(RootElement parent) {
-        destroySections();
-
-        GroupDetailSection groupDetailSection = formFactory.createGroupDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE| ExpandableComposite.EXPANDED);
-        MemberDetailSection memberDetailSection = formFactory.createMemberDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        GrantedAuthorityDetailSection grantedAuthorityDetailSection = formFactory.createGrantedAuthorityDetailSection(getConversationHolder(), parent,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(groupDetailSection);
-        addPart(memberDetailSection);
-        addPart(grantedAuthorityDetailSection);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public ISelection getSelection() {
-        return selection;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void setSelection(ISelection selection, boolean reveal) {
-
-               this.selection = selection;
-
-               if(this.selection!=null){
-                   SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection);
-                   fireSelectionChanged(selectionChangedEvent);
-               }
-
-    }
-
-    private void createTaxonSections(RootElement parent) {
-        destroySections();
-
-        ParsingMessagesSection parsingMessagesSection = formFactory.createParsingMessagesSection(getConversationHolder(), parent, this,
-                ExpandableComposite.EXPANDED | ExpandableComposite.EXPANDED);
-        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION)){
-               TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
-               ExpandableComposite.TWISTIE     | ExpandableComposite.EXPANDED);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               addPart(taxonBaseDetailSection);
-        }else{
-               if (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_TAXON)){
-                   TaxonBaseDetailSection taxonBaseDetailSection = formFactory.createTaxonBaseDetailSection(getConversationHolder(), parent, this,
-                               ExpandableComposite.TWISTIE     | ExpandableComposite.EXPANDED);
-                   formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-                   addPart(taxonBaseDetailSection);
-               }
-        }
-        NonViralNameDetailSection nonViralNameSection = formFactory
-                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-        if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
-                   NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
-                               ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-                   formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-                   addPart(referenceDetailSection);
-
-        }
-        if ( !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
-                   NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
-                               ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-                   formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-                   addPart(nomenclaturalStatusSection);
-        }
-
-       if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
-               ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               addPart(protologSection);
-       }
-
-       if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) &&  PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
-               TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               addPart(typeDesignationSection);
-       }
-
-       if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
-               NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               addPart(nameRelationshipSection);
-       }
-
-
-        addPart(parsingMessagesSection);
-
-        addPart(nonViralNameSection);
-
-    }
-
-    private void createNameSections(RootElement parent) {
-        destroySections();
-        NonViralNameDetailSection nonViralNameSection = formFactory.createNonViralNameDetailSection(
-                getConversationHolder(), parent, this, false, ExpandableComposite.TWISTIE
-                        | ExpandableComposite.EXPANDED);
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
-                       ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
-                       ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        addPart(nonViralNameSection);
-        addPart(nomenclaturalStatusSection);
-        addPart(referenceDetailSection);
-
-               ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-        addPart(protologSection);
-        addPart(typeDesignationSection);
-        addPart(nameRelationshipSection);
-
-    }
-
-    private void createReferenceSections(RootElement parent) {
-        destroySections();
-
-        ReferenceDetailSection referenceDetailSection = formFactory.createReferenceDetailSection(getConversationHolder(), parent, this,
-                       ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(referenceDetailSection);
-    }
-
-    private void createTeamOrPersonBaseDetailSection(RootElement parent) {
-        destroySections();
-        TeamOrPersonBaseDetailSection teamOrPersonBaseDetailSection = formFactory.createTeamOrPersonBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(teamOrPersonBaseDetailSection);
-    }
-
-    private void createTeamDetailSection(RootElement parent) {
-        destroySections();
-        TeamDetailSection teamDetailSection = formFactory.createTeamDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(teamDetailSection);
-    }
-
-    private void createPersonDetailSection(RootElement parent) {
-        destroySections();
-        PersonDetailSection personDetailSection = formFactory.createPersonDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        addPart(personDetailSection);
-    }
-
-    private void createDescriptionElementSection(RootElement parent) {
-        destroySections();
-
-        DescriptionElementDetailSection descriptionElementDetailSection = formFactory.createDescriptionElementDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-      //  IntextReferenceSection intextReferenceSection = formFactory.createIntextReferenceSection(getConversationHolder(), parent,  ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        DescriptionElementSourceSection descriptionElementSourceSection = formFactory.createDescriptionElementSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        DescriptionElementMediaSection descriptionElementMediaSection = formFactory.createDescriptionElementMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        addPart(descriptionElementDetailSection);
-        addPart(descriptionElementSourceSection);
-        addPart(descriptionElementMediaSection);
-    }
-
-    private void createDescriptionSection(RootElement parent) {
-        destroySections();
-        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        NaturalLanguageSection naturalLanguageSection = formFactory.createNaturalLanguageSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-//        DescribedSpecimenSection describedSpecimenSection = formFactory.createDescribedSpecimenSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-//
-//        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        //             DescriptionSourceSection descriptionSourceSection = (DescriptionSourceSection) formFactory
-        //                             .createEntityDetailSection(EntityDetailType.DESCRIPTIONSOURCE,
-        //                                             getConversationHolder(), parent, Section.TWISTIE);
-        //
-        //             formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        ScopeSection scopeSection = formFactory.createScopeSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        addPart(descriptionDetailSection);
-        addPart(naturalLanguageSection);
-//        addPart(describedSpecimenSection);
-        //             addPart(descriptionSourceSection);
-        addPart(scopeSection);
-    }
-
-    private void createSpecimenDescriptionSection(RootElement parent) {
-        destroySections();
-        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        addPart(descriptionDetailSection);
-    }
-
-    private void createUseDescriptionSection(RootElement parent) {
-        destroySections();
-        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        DescriptionSourceSection descriptionSourceSection = formFactory.createDescriptionSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        addPart(descriptionDetailSection);
-        addPart(descriptionSourceSection);
-
-    }
-
-    private void createImageGallerySection(RootElement parent) {
-        destroySections();
-        DescriptionDetailSection descriptionDetailSection = formFactory.createDescriptionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(descriptionDetailSection);
-    }
-
-    private void createMediaElementSection(RootElement parent) {
-        destroySections();
-
-        MediaDetailsSection mediaDetailSection = formFactory.createMediaDetailsSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(mediaDetailSection);
-    }
-
-    private void createDerivedUnitBaseElementSection(RootElement parent) {
-        destroySections();
-
-        DerivedUnitGeneralDetailSection derivedUnitGeneralDetailSection = formFactory.createDerivedUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        //TODO for DerivateEditor do not use facade anymore to avoid this special case handling #4539
-//        if(!(AbstractUtility.getActiveE4Part() instanceof IDerivedUnitFacadePart)){
-//            derivedUnitGeneralDetailSection.setShowOnlyDerivedUnitData(true);
-//        }
-        addPart(derivedUnitGeneralDetailSection);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        DerivedUnitBaseDetailSection derivedUnitBaseDetailSection = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        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);
-
-            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-            FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-            addPart(fieldUnitDetailSection);
-        }
-        else{
-
-            if(PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_TAXON_ASSOCIATIONS)){
-                formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-                TaxonAssociationDetailSection taxonAssociationDetailSection = formFactory.createTaxonAssociationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-                addPart(taxonAssociationDetailSection);
-            }
-            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-            DerivedUnitFacadeIdentifierSection identifierDetailSection = formFactory.createDerivedUnitFacadeIdentifierSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-            addPart(identifierDetailSection);
-        }
-        if(!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.DETERMINATION_ONLY_FOR_FIELD_UNITS)){
-            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-            DeterminationDetailSection determinationDetailSection = formFactory.createDeterminationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-            addPart(determinationDetailSection);
-        }
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-        DerivedUnitTypeDesignationSection derivedUnitTypeDesignationSection = formFactory.createDerivedUnitTypeDesignationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-        addPart(derivedUnitTypeDesignationSection);
-
-    }
-
-    private void createFieldUnitSection(RootElement parent) {
-        destroySections();
-
-        FieldUnitGeneralDetailSection fielUnitGeneralDetailSection = formFactory.createFieldUnitGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        GatheringEventDetailSection gatheringEventDetailSection = formFactory.createGatheringEventDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-
-        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);
-        }
-    }
-
-    private void createTissueSampleSection(RootElement parent) {
-        destroySections();
-
-        TissueSampleGeneralDetailSection section = formFactory.createTissueSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(section);
-        addPart(sampleDesignationDetailSection);
-    }
-
-    private void createDnaSampleSection(RootElement parent) {
-        destroySections();
-
-        DnaSampleGeneralDetailSection section = formFactory.createDnaSampleGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        DnaSamplePreparationPreservationSection preparationPreservationSection = formFactory.createDnaSamplePreparationPreservationSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        DnaQualityDetailSection qualitySection = formFactory.createDnaQualityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        SampleDesignationDetailSection sampleDesignationDetailSection = formFactory.createSampleDesignationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(section);
-        addPart(preparationPreservationSection);
-        addPart(qualitySection);
-        addPart(sampleDesignationDetailSection);
-    }
-
-    private void createSequenceSection(RootElement parent) {
-        destroySections();
-
-        SequenceGeneralDetailSection section = formFactory.createSequenceGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        SequenceReferenceCollectionDetailSection referenceSection = formFactory.createSequenceReferenceCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        SequenceContigFileCollectionDetailSection contigFileSection = formFactory.createSequenceContigFileCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-
-        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);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        SingleReadPherogramCollectionDetailSection pherogramSection = formFactory.createSingleReadPherogramCollectionDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        addPart(pherogramSection);
-
-    }
-
-    private void createMediaSpecimenSection(RootElement parent) {
-        destroySections();
-
-        MediaSpecimenGeneralDetailSection generalSection = formFactory.createMediaSpecimenGeneralDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        addPart(generalSection);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-        addPart(rightsSection);
-
-    }
-
-    private void createFeatureDistributionSection(RootElement parent) {
-        destroySections();
-
-        FeatureDistributionDetailSection featureDistributionSection = formFactory.createFeatureDistributionDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(featureDistributionSection);
-    }
-
-    private void createPolytomousKeyNodeSection(RootElement parent) {
-        destroySections();
-
-        PolytomousKeyDetailSection polytomousKeyDetailSection = formFactory.createPolytomousKeyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        PolytomousKeyNodeDetailSection polytomousKeyNodeDetailSection = formFactory.createPolytomousKeyNodeDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(polytomousKeyDetailSection);
-        addPart(polytomousKeyNodeDetailSection);
-
-    }
-
-    private void createUseRecordSection(RootElement parent) {
-        destroySections();
-
-        UseRecordDetailSection descriptionUseRecordSection = formFactory.createUseRecordDetailSection(getConversationHolder(), parent, this,ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        addPart(descriptionUseRecordSection);
-
-
-    }
-
-    private void createUserSection(RootElement parent) {
-        destroySections();
-
-        UserDetailSection userDetailSection = formFactory.createUserDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        GroupsByUserDetailSection groupByUserDetailSection = formFactory.createGroupsByUserDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        addPart(userDetailSection);
-        addPart(groupByUserDetailSection);
-    }
-
-    private void createMisappliedNameSection(RootElement parent) {
-        destroySections();
-
-        TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-       // ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        addPart(taxonRelationshipDetailSection);
-        //addPart(referencedEntityBaseDetailSection);
-
-        NonViralNameDetailSection nonViralNameSection = formFactory
-                .createNonViralNameDetailSection(getConversationHolder(), parent, this, true,
-                        ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        addPart(nonViralNameSection);
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-        //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_REFERENCE))){
-        NomenclaturalReferenceDetailSection referenceDetailSection = formFactory.createNomenclaturalReferenceDetailSection(getConversationHolder(), parent, this,
-                       ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-        addPart(referenceDetailSection);
-
-        //if ( !PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NOMENCLATURAL_STATUS))){
-            NomenclaturalStatusSection nomenclaturalStatusSection = formFactory.createNomenclaturalStatusSection(getConversationHolder(), parent,
-                       ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-            formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-            addPart(nomenclaturalStatusSection);
-    //}
-
-       //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_PROTOLOGUE))){
-               ProtologueSection protologSection = formFactory.createProtologueSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               addPart(protologSection);
-       //}
-
-       //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) &&  PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_TYPE_DESIGNATION))){
-               TypeDesignationSection typeDesignationSection = formFactory.createTypeDesignationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               addPart(typeDesignationSection);
-       //}
-
-       //if (!PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) || (PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_SIMPLE_NAME_DETAILS_SECTION) && PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_NAME_DETAILS_SECTION_NAME_RELATIONSHIP))){
-               NameRelationshipDetailSection nameRelationshipSection = formFactory.createNameRelationshipDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-               formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-               addPart(nameRelationshipSection);
-       //}
-
-
-        //}
-    }
-
-    private void createTaxonRelationshipSection(RootElement parent) {
-       destroySections();
-
-       TaxonRelationshipDetailSection taxonRelationshipDetailSection = formFactory.createTaxonRelationshipDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-
-        ReferencedEntityDetailSection referencedEntityBaseDetailSection = formFactory.createReferencedEntityDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        addPart(taxonRelationshipDetailSection);
-        addPart(referencedEntityBaseDetailSection);
-    }
-    private void createTermVocabularySection(RootElement parent) {
-        destroySections();
-
-        TermVocabularyDetailSection termVocabularyDetailSection = formFactory.createTermVocabularyDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        addPart(termVocabularyDetailSection);
-    }
-
-    private void createDefinedTermSection(RootElement parent) {
-        destroySections();
-
-        AbstractFormSection<?> definedTermDetailSection = formFactory.createDefinedTermDetailSection(getInput().getClass(), getConversationHolder(), parent, this, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
-        addPart(definedTermDetailSection);
-    }
-
-       @Override
-       public void update(CdmDataChangeMap arg0) {
-
-       }
-
-}
index b26eaced8e2da568fe87ade9dbb9bac53a2ca56c..6e6b8291eb74a2318683f7245312d4289045a27e 100755 (executable)
@@ -125,13 +125,12 @@ import eu.etaxonomy.taxeditor.ui.section.user.GroupsByUserDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.user.UserDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.userecords.UseRecordDetailSection;
 import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
-import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
 import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
 
 /**
  *
  * The DetailsViewer handles the content of the details view (
- * {@link DetailsViewPart}).<br>
+ * {@link DetailsViewerE4}).<br>
  * Depending on the type of the selected element the section of the details view
  * are created.
  *
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewPart.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/supplementaldata/SupplementalDataViewPart.java
deleted file mode 100644 (file)
index 6295eef..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.view.supplementaldata;
-
-import java.util.Set;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewerInternals;
-import org.eclipse.jface.viewers.TreeNode;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.EditorPart;
-
-import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
-import eu.etaxonomy.cdm.ext.occurrence.gbif.GbifResponse;
-import eu.etaxonomy.cdm.model.description.PolytomousKeyNode;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
-import eu.etaxonomy.taxeditor.editor.ITaxonEditor;
-import eu.etaxonomy.taxeditor.l10n.Messages;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-import eu.etaxonomy.taxeditor.model.FeatureNodeContainer;
-import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
-import eu.etaxonomy.taxeditor.view.AbstractCdmEditorViewPart;
-import eu.etaxonomy.taxeditor.workbench.WorkbenchUtility;
-
-
-/**
- * <p>SupplementalDataViewPart class.</p>
- *
- * @author n.hoffmann
- * @created Jun 10, 2010
- * @version 1.0
- */
-public class SupplementalDataViewPart extends AbstractCdmEditorViewPart {
-
-       /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.view.supp"{trunked}</code> */
-       public static final String ID = "eu.etaxonomy.taxeditor.view.supplementalData"; //$NON-NLS-1$
-
-       private SupplementalDataViewer viewer;
-
-       /* (non-Javadoc)
-        * @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
-        */
-       /** {@inheritDoc} */
-       @Override
-       public void createViewer(Composite parent) {
-               viewer = new SupplementalDataViewer(parent, this);
-       }
-
-
-       /** {@inheritDoc} */
-       @Override
-       protected void selectionChanged_internal(IWorkbenchPart workbenchPart, ISelection selection) {
-           Object partObject = workbenchPart;
-        Object wrappedPart = WorkbenchUtility.getE4WrappedPart(partObject);
-        if(wrappedPart!=null){
-            partObject = wrappedPart;
-        }
-               if(AbstractUtility.getActiveEditor() == null){
-                       showEmptyPage();
-                       return;
-               }
-
-        if(partObject == this){
-            return;
-        }
-
-        if(!(selection instanceof IStructuredSelection)){
-            return;
-        }
-
-        IStructuredSelection structuredSelection = (IStructuredSelection) selection;
-        
-               if((partObject instanceof EditorPart || partObject instanceof IPartContentHasSupplementalData)) {
-                       if(structuredSelection.size() != 1){
-                               showEmptyPage();
-                               return;
-                       }
-               if (partObject instanceof ITaxonEditor && structuredSelection.getFirstElement() instanceof Taxon ){
-                       if (((ITaxonEditor)partObject).getTaxon() != structuredSelection.getFirstElement() && ((Taxon)structuredSelection.getFirstElement()).isMisapplication()){
-                               Set<TaxonRelationship> rels =((Taxon)structuredSelection.getFirstElement()).getTaxonRelations(((ITaxonEditor)partObject).getTaxon());
-                               if (rels.size() == 1){
-                                        structuredSelection = new StructuredSelection(rels.iterator().next());
-                               }else{
-                                       showEmptyPage();
-                                       return;
-                               }
-                               
-                       }
-               }
-                       // do not show supplemental data for feature nodes
-                       if(structuredSelection.getFirstElement() instanceof FeatureNodeContainer){
-                               showEmptyPage();
-                               return;
-                       }
-                       else if(structuredSelection.getFirstElement() instanceof DerivedUnitFacade){
-                               return;
-                       }
-                       else if(structuredSelection.getFirstElement() instanceof PolytomousKeyNode){
-                           structuredSelection = new StructuredSelection(((PolytomousKeyNode)structuredSelection.getFirstElement()).getKey());
-            }
-                       else if(structuredSelection.getFirstElement() instanceof TreeNode){
-                               structuredSelection = new StructuredSelection(((TreeNode)structuredSelection.getFirstElement()).getValue());
-                       }
-                       else if(structuredSelection.getFirstElement() instanceof GbifResponse){
-                           structuredSelection = new StructuredSelection(((GbifResponse)structuredSelection.getFirstElement()).getDerivedUnitFacade().innerDerivedUnit());
-                       } 
-                       
-                       showViewer(partObject, structuredSelection);
-               }else{
-                       showEmptyPage();
-               }
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void dispose() {
-               super.dispose();
-               selectionService.removePostSelectionListener(this);
-       }
-
-
-       /** {@inheritDoc} */
-       @Override
-       public Viewer getViewer() {
-               return viewer;
-       }
-
-       /**
-        * <p>onComplete</p>
-        *
-        * @return a boolean.
-        */
-       @Override
-    public boolean onComplete() {
-               // TODO Auto-generated method stub
-               return false;
-       }
-
-
-       @Override
-       protected String getViewName() {
-               return Messages.SupplementalDataViewPart_VIEWER_NAME;
-       }
-}
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
deleted file mode 100644 (file)
index 7941824..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.view.supplementaldata;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.forms.widgets.ExpandableComposite;
-
-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;
-import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.element.RootElement;
-import eu.etaxonomy.taxeditor.ui.section.media.MediaSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.AnnotationSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.CdmBaseSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.CreditSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.ExtensionSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.HeadlineSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.MarkerSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.RightsSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.SourceSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.VersionSection;
-import eu.etaxonomy.taxeditor.ui.section.supplemental.identifier.IdentifierSection;
-import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer;
-import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart;
-import eu.etaxonomy.taxeditor.view.detail.DetailsViewer;
-
-/**
- * <p>SupplementalDataViewer class.</p>
- *
- * @author n.hoffmann
- * @created Feb 12, 2010
- * @version 1.0
- */
-public class SupplementalDataViewer extends AbstractCdmDataViewer implements ISelectionChangedListener {
-
-       private boolean showDebug;
-
-
-       /**
-        * <p>Constructor for SupplementalDataViewer.</p>
-        *
-        * @param parent a {@link org.eclipse.swt.widgets.Composite} object.
-        * @param viewPart a {@link eu.etaxonomy.taxeditor.view.AbstractCdmViewPart} object.
-        */
-       public SupplementalDataViewer(Composite parent, AbstractCdmViewPart viewPart) {
-               super(parent, viewPart);
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public ISelection getSelection() {
-               return null;
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       public void setSelection(ISelection selection, boolean reveal) {
-
-       }
-
-       /** {@inheritDoc} */
-       @Override
-       protected void showParts() {
-
-               showDebug = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.SHOW_DEBUG_INFORMATION);
-
-               Object input;
-
-               if(getInput() instanceof IElementHasDetails){
-                       input = ((IElementHasDetails) getInput()).getData();
-               }else{
-                       input = getInput();
-               }
-
-               destroySections();
-               //1. Headline
-               createHeadlineSection(rootElement);
-               //2. Annotatable entitiy
-               if(input instanceof AnnotatableEntity){
-                               createAnnotationSections(rootElement);
-               }
-               //3. Identifiable entity
-               if(input instanceof IdentifiableEntity){
-                       createIdentifiableSections(rootElement);
-               }
-               //4. Identifiable media entity
-               if(input instanceof IdentifiableMediaEntity){
-                       createIdentifiableMediaSections(rootElement);
-               }
-               //5. Versionable
-               if(input instanceof VersionableEntity){
-                               createVersionSection(rootElement);
-               }
-               //6. CdmBase
-               if(showDebug){
-                       createCdmBaseSection(rootElement);
-               }
-
-               layout();
-       }
-
-
-
-       private void createHeadlineSection(RootElement parent){
-               HeadlineSection headlineSection = formFactory.createHeadlineSection(parent);
-               addPart(headlineSection);
-       }
-
-    private void createAnnotationSections(RootElement parent) {
-        AnnotationSection annotationSection = formFactory.createAnnotationSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        MarkerSection markerSection = formFactory.createMarkerSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        addPart(annotationSection);
-        addPart(markerSection);
-    }
-
-    private void createIdentifiableSections(RootElement parent) {
-
-        SourceSection sourceSection = formFactory.createSourceSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        IdentifierSection identifierSection = formFactory.createIdentifierDetailSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        ExtensionSection extensionSection = formFactory.createExtensionSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        CreditSection creditSection = formFactory.createCreditSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        RightsSection rightsSection = formFactory.createRightsSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        addPart(sourceSection);
-        addPart(identifierSection);
-        addPart(extensionSection);
-        addPart(creditSection);
-        addPart(rightsSection);
-
-       }
-
-    private void createIdentifiableMediaSections(RootElement parent) {
-        MediaSection mediaSection = formFactory.createMediaSection(getConversationHolder(), parent, ExpandableComposite.TWISTIE);
-
-        formFactory.createHorizontalSeparator(parent, SWT.BORDER);
-
-        addPart(mediaSection);
-    }
-
-       private void createVersionSection(RootElement parent){
-               VersionSection versionSection = formFactory.createVersionSection(parent, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED);
-               addPart(versionSection);
-       }
-
-       /**
-        * @param rootElement
-        */
-       private void createCdmBaseSection(RootElement parent) {
-
-               CdmBaseSection cdmBaseSection = formFactory.createCdmBaseSection(parent, ExpandableComposite.NO_TITLE | ExpandableComposite.EXPANDED);
-               addPart(cdmBaseSection);
-       }
-
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
-        */
-       /** {@inheritDoc} */
-       @Override
-    public void selectionChanged(SelectionChangedEvent event) {
-               if(event.getSource() instanceof DetailsViewer){
-                       if(event.getSelection() == CdmFormFactory.EMPTY_SELECTION){
-                               setInput(null);
-                               return;
-                       }
-
-                       IStructuredSelection selection = (IStructuredSelection) event.getSelection();
-                       setInput(selection.getFirstElement());
-               }
-       }
-
-       @Override
-       public void update(CdmDataChangeMap arg0) {
-       }
-}