From 8f96bb656b1e48ce4654a91881ef2923059697e2 Mon Sep 17 00:00:00 2001 From: Patrick Plitzner Date: Wed, 28 Oct 2015 18:41:33 +0100 Subject: [PATCH] Remove identifier and taxon associations from bulk editor details view - reduce space taken by taxon associaton section #5348 --- .../TaxonAssociationDetailElement.java | 13 ++++++------- .../taxeditor/view/detail/DetailsViewer.java | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/association/TaxonAssociationDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/association/TaxonAssociationDetailElement.java index a7d9f73c4..4ff63d538 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/association/TaxonAssociationDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/association/TaxonAssociationDetailElement.java @@ -70,18 +70,20 @@ public class TaxonAssociationDetailElement extends AbstractCdmDetailElement> associatedTaxa = CdmStore.getService(IOccurrenceService.class).listAssociatedTaxa(entity.innerDerivedUnit(), null, null, null, null); - if(associatedTaxa.isEmpty()){ - Label associationsLabel = formFactory.createLabel(getLayoutComposite(), "Individuals Associations"); - associationsLabel.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); + Collection typeDesignations = CdmStore.getService(IOccurrenceService.class).listTypeDesignations(entity.innerDerivedUnit(), null, null, null, null); + if(!associatedTaxa.isEmpty()){ associationsViewer = new TableViewer(getLayoutComposite(), SWT.FULL_SELECTION); associationsViewer.getTable().setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); associationsViewer.setContentProvider(new ArrayContentProvider()); associationsViewer.setInput(associatedTaxa); associationsViewer.addDoubleClickListener(this); } + else{ + Label label = formFactory.createLabel(getLayoutComposite(), "No associations"); + label.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); + } - Collection typeDesignations = CdmStore.getService(IOccurrenceService.class).listTypeDesignations(entity.innerDerivedUnit(), null, null, null, null); //TODO implement service method for this which is just used in the label provider Collection> typedTaxa = new HashSet>(); for (SpecimenTypeDesignation specimenTypeDesignation : typeDesignations) { @@ -112,9 +114,6 @@ public class TaxonAssociationDetailElement extends AbstractCdmDetailElement