ref #9084: add config to delete description in character matrix
authorKatja Luther <k.luther@bgbm.org>
Fri, 19 Jun 2020 19:32:05 +0000 (21:32 +0200)
committerKatja Luther <k.luther@bgbm.org>
Fri, 19 Jun 2020 19:32:05 +0000 (21:32 +0200)
13 files changed:
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/DescriptiveDataSetEditor.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrix.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixPart.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/handler/DeleteDescriptionHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/Messages.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages.properties
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/Messages.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/l10n/messages_de.properties
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteConfiguratorDialog.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteDescriptionFromDescriptiveDatasetConfiguratorComposite.java [new file with mode: 0755]
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteDescriptiveDatasetConfiguratorComposite.java

index 258d599ecdafb91f27f08a3347c4258b7f0eb097..b54be354ab4724ab31903fcb2a12e1a8bbc53748 100644 (file)
@@ -296,10 +296,10 @@ IPartContentHasDetails, IPartContentHasSupplementalData, IDirtyMarkable, IDescri
         Object input = composite.getTaxonNodeTree().getInput();
         if(input!=null){
             descriptiveDataSet.setTaxonSubtreeFilter(new HashSet<>());//clear existing filter
-            Collection<TaxonNodeDto> taxonNodes = (Collection<TaxonNodeDto>) input;
-            for (TaxonNodeDto taxonTreeNode : taxonNodes) {
-                TaxonNode taxonNode =  CdmStore.getService(ITaxonNodeService.class).load(taxonTreeNode.getUuid());
-                descriptiveDataSet.addTaxonSubtree(taxonNode);
+            Collection<TaxonNode> taxonNodes = (Collection<TaxonNode>) input;
+            for (TaxonNode taxonTreeNode : taxonNodes) {
+//                TaxonNode taxonNode =  CdmStore.getService(ITaxonNodeService.class).load(taxonTreeNode.getUuid());
+                descriptiveDataSet.addTaxonSubtree(taxonTreeNode);
             }
         }
         TermTree<Feature> characters = composite.getCharacters();
index 6397c266b32bbc0610e774068133bc77c44bfda8..5425ff76f53685aa770c96986ffeeb0526ab4626 100644 (file)
@@ -101,6 +101,7 @@ import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.service.IDescriptiveDataSetService;
 import eu.etaxonomy.cdm.api.service.IOccurrenceService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
+import eu.etaxonomy.cdm.api.service.config.RemoveDescriptionsFromDescriptiveDataSetConfigurator;
 import eu.etaxonomy.cdm.api.service.dto.FieldUnitDTO;
 import eu.etaxonomy.cdm.api.service.dto.RowWrapperDTO;
 import eu.etaxonomy.cdm.api.service.dto.SpecimenRowWrapperDTO;
@@ -191,7 +192,8 @@ public class CharacterMatrix extends Composite {
     private CharacterMatrixToolbar toolbar;
 
     private DescriptionTreeFormat treeFormat;
-    private List<UUID> descriptionUuidsToDelete;
+//    private List<UUID> descriptionUuidsToDelete;
+    Map<RemoveDescriptionsFromDescriptiveDataSetConfigurator, List<UUID>> descriptionUuidsToDelete;
 
     private List<SpecimenNodeWrapper> specimenToAdd;
 
@@ -758,16 +760,22 @@ public class CharacterMatrix extends Composite {
         part.setDirty();
     }
 
-    public List<UUID> getDescriptionsToDelete() {
+    public Map<RemoveDescriptionsFromDescriptiveDataSetConfigurator, List<UUID>> getDescriptionsToDelete() {
         return descriptionUuidsToDelete;
     }
 
-    public void addDescriptionToDelete(UUID descriptionToDelete) {
+    public void addDescriptionToDelete(UUID descriptionToDelete, RemoveDescriptionsFromDescriptiveDataSetConfigurator config) {
         if (descriptionUuidsToDelete == null){
-            descriptionUuidsToDelete = new ArrayList();
+            descriptionUuidsToDelete = new HashMap<>();
+        }
+        if (descriptionUuidsToDelete.get(config) != null){
+            descriptionUuidsToDelete.get(config).add(descriptionToDelete);
+        }else{
+            List<UUID> uuidList = new ArrayList<>();
+            uuidList.add(descriptionToDelete);
+            this.descriptionUuidsToDelete.put(config, uuidList);
         }
 
-        this.descriptionUuidsToDelete.add(descriptionToDelete);
 
     }
 
index 132d3b69c3b875c2c74822dff88f956da5a46d3c..682712ce2a58c81b8fa0dad9e2027290277ba8be 100644 (file)
@@ -41,6 +41,7 @@ import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
 import eu.etaxonomy.cdm.api.service.DeleteResult;
 import eu.etaxonomy.cdm.api.service.IDescriptionService;
 import eu.etaxonomy.cdm.api.service.IDescriptiveDataSetService;
+import eu.etaxonomy.cdm.api.service.config.RemoveDescriptionsFromDescriptiveDataSetConfigurator;
 import eu.etaxonomy.cdm.api.service.dto.DescriptionBaseDto;
 import eu.etaxonomy.cdm.api.service.dto.RowWrapperDTO;
 import eu.etaxonomy.cdm.api.service.dto.SpecimenRowWrapperDTO;
@@ -199,7 +200,10 @@ ICdmEntitySessionEnabled, IPartContentHasSupplementalData, IPartContentHasDetail
 //        descriptions.removeAll(matrix.getRowsToSave().values());
         matrix.getRowsToMerge().clear();
         if (matrix.getDescriptionsToDelete() != null && !matrix.getDescriptionsToDelete().isEmpty()){
-            DeleteResult result = CdmStore.getService(IDescriptiveDataSetService.class).removeDescriptions(matrix.getDescriptionsToDelete(), matrix.getDescriptiveDataSet().getUuid());
+            DeleteResult result = new DeleteResult();
+            for (RemoveDescriptionsFromDescriptiveDataSetConfigurator config: matrix.getDescriptionsToDelete().keySet()){
+               result.includeResult(CdmStore.getService(IDescriptiveDataSetService.class).removeDescriptions(matrix.getDescriptionsToDelete().get(config), matrix.getDescriptiveDataSet().getUuid(), config));
+            }
             matrix.getDescriptionsToDelete().clear();
         }
         List<MergeResult<DescriptionBase>> results = CdmStore.getService(IDescriptionService.class).mergeDescriptions(descriptions, matrix.getDescriptiveDataSet().getUuid(), true);
index 44ad997f4a3c51e0b26c3ea766f78b8a96b18910..57fdfafd0d98edf1b3b113c4bb89c8fb6f35319f 100755 (executable)
@@ -17,7 +17,9 @@ import org.eclipse.e4.ui.model.application.ui.basic.MPart;
 import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
 import org.eclipse.e4.ui.services.IServiceConstants;
 import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Shell;
 
+import eu.etaxonomy.cdm.api.service.config.RemoveDescriptionsFromDescriptiveDataSetConfigurator;
 import eu.etaxonomy.cdm.api.service.dto.RowWrapperDTO;
 import eu.etaxonomy.cdm.api.service.dto.SpecimenRowWrapperDTO;
 import eu.etaxonomy.cdm.model.description.DescriptionBase;
@@ -27,6 +29,8 @@ import eu.etaxonomy.cdm.model.occurrence.SpecimenOrObservationBase;
 import eu.etaxonomy.cdm.persistence.dto.SpecimenNodeWrapper;
 import eu.etaxonomy.cdm.persistence.dto.UuidAndTitleCache;
 import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.CharacterMatrixPart;
+import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.ui.dialog.configurator.deleteConfigurator.DeleteConfiguratorDialog;
 
 /**
  *  @author k.luther
@@ -36,7 +40,9 @@ import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.CharacterMatrixPa
 public class DeleteDescriptionHandler{
 
     @Execute
-    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart, UISynchronize sync) {
+    public void execute(@Named(IServiceConstants.ACTIVE_PART)MPart activePart,
+            @Named(IServiceConstants.ACTIVE_SHELL)Shell shell,
+            UISynchronize sync) {
         CharacterMatrixPart matrixPart = (CharacterMatrixPart) activePart.getObject();
 //        if(StoreUtil.promptCheckIsDirty(matrixPart)){
 //            return;
@@ -44,9 +50,13 @@ public class DeleteDescriptionHandler{
         DescriptiveDataSet descriptiveDataSet = matrixPart.getDescriptiveDataSet();
         RowWrapperDTO wrapper = (RowWrapperDTO) matrixPart.getSelection().getFirstElement();
         DescriptionBase description = wrapper.getDescription().getDescription();
+        RemoveDescriptionsFromDescriptiveDataSetConfigurator deleteConfig = new RemoveDescriptionsFromDescriptiveDataSetConfigurator();
 
+        if (!DeleteConfiguratorDialog.openConfirmWithConfigurator(deleteConfig, shell, Messages.DeleteDescriptiveDataSetHandler_DELETE_TITLE,  Messages.CharacterMatrix_DELETE_DESCRIPTION)){
+            return;
+        }
         boolean ok = matrixPart.getMatrix().getDescriptions().remove(wrapper);
-        matrixPart.getMatrix().addDescriptionToDelete(description.getUuid());
+        matrixPart.getMatrix().addDescriptionToDelete(description.getUuid(), deleteConfig);
         if (description instanceof SpecimenDescription){
             UuidAndTitleCache<SpecimenOrObservationBase> uuidAndTitleCache = new UuidAndTitleCache<>(((SpecimenRowWrapperDTO)wrapper).getSpecimen().getUuid(), ((SpecimenRowWrapperDTO)wrapper).getSpecimen().getId(), ((SpecimenRowWrapperDTO)wrapper).getSpecimen().getTitleCache());
             SpecimenNodeWrapper nodeWrapper = new SpecimenNodeWrapper(uuidAndTitleCache,
index 61e2cceb9d03833da14a90fdc461a13b244fc8cf..b0c0de3e57791b5a4ed443b597c13a01e35c9246 100644 (file)
@@ -320,6 +320,8 @@ public class Messages extends NLS {
     public static String NameFactsDataView_Lable;
     public static String DeleteDescriptiveDatasetHandler_Warning_Message;
     public static String DeleteDescriptiveDatasetHandler_Exception_Message;
+    public static String CharacterMatrix_ONLY_REMOVE;
+    public static String CharacterMatrix_DELETE_DESCRIPTION;
 
     static {
         // initialize resource bundle
index d64fb8957355a986ddefb7687d65de5c61074574..e5a06741fe73662efefbe70e36cb5e32ffc9a80e 100644 (file)
@@ -214,6 +214,8 @@ CharacterMatrix_SHOW_FLAT_LIST=Show flat list
 CharacterMatrix_SHOW_HIERARCHY=Show taxon hierarchy
 CharacterMatrix_TAXON=Unit
 CharacterMatrix_VIEW_CONFIG=View configuration
+CharacterMatrix_ONLY_REMOVE=Only remove from descriptive dataset
+CharacterMatrix_DELETE_DESCRIPTION=Do you really want to delete the description
 CharacterMatrixBottomToolbar_AGGREGATE=Aggregate
 CharacterMatrixBottomToolbar_AGGREGATION_MESSAGE=The aggregated description will be stored at the common parent taxon of this data set:\n%s\n\nDo you want to use this taxon?
 CharacterMatrixBottomToolbar_AGGREGATION_TITLE=Choose location for the aggregated description
index e4ea0c53b49662face99b08e4aab6c03c1b92d5d..24eba01e4895023aeaf8b7ec0b3bbc6a5e62730f 100644 (file)
@@ -213,6 +213,8 @@ CharacterMatrix_SHOW_FLAT_LIST=Listenansicht
 CharacterMatrix_SHOW_HIERARCHY=Baumansicht
 CharacterMatrix_TAXON=Unit
 CharacterMatrix_VIEW_CONFIG=Ansicht konfigurieren
+CharacterMatrix_ONLY_REMOVE=Nur aus Descriptive Data Set entfernen
+CharacterMatrix_DELETE_DESCRIPTION=Wollen Sie die Beschreibung wirklich löschen?
 CharacterMatrixBottomToolbar_AGGREGATE=Aggregation
 CharacterMatrixBottomToolbar_AGGREGATION_MESSAGE=Die aggregierte Beschreibung wird an das gemeinsame, nächst-höhere Taxon dieses Datasets gehangen:\n%s\n\nSoll dieses Taxon verwenden werden?
 CharacterMatrixBottomToolbar_AGGREGATION_TITLE=Wählen Sie den Speicherort für die aggregierte Beschreibung
@@ -253,6 +255,7 @@ DeleteDescriptionElementOperation_DESC_NOT_FOUND=Beschreibung konnte nicht gefun
 DeleteDescriptiveDataSetHandler_DELETE_FAILED_MESSAGE=Löschen fehlgeschlagen.
 DeleteDescriptiveDataSetHandler_DELETE_FAILED_TITLE=Löschen fehlgeschlagen
 DeleteDescriptiveDataSetHandler_DELETE_MESSAGE=Wollen Sie wirklich den deskriptiven Datensatz löschen?
+DeleteDescriptiveDataSetHandler_DELETE_SELECTION=Wählen Sie welche Beschreibungen komplett gelöscht werden sollen (nicht ausgewählte Beschreibungen verbleiben in der Datenbank und verknüpft mit ihrem Beleg/Taxon)
 DeleteDescriptiveDataSetHandler_DELETE_TITLE=Löschen bestätigen
 DeleteHandler_CONFIRM_DELETION=Löschen bestätigen
 DeleteHandler_CONFIRM_DELETION_MESSAGE=Wollen sie die Mediendaten wirklich löschen?
index 1d1d8388d5da558118860b96ca0956fe59e70e90..1c42bb89b4a5419aa371387e412ea90d9310543d 100644 (file)
@@ -287,6 +287,7 @@ public class Messages extends NLS {
     public static String DeleteConfiguration_descriptiveDataSet_deleteAllLiteratureDesc;
     public static String DeleteConfiguration_descriptiveDataSet_deleteAllDefaultDesc;
     public static String DeleteConfiguration_descriptiveDataSet_deleteAllAggregatedDesc;
+    public static String DeleteConfiguration_descriptiveDataSet_deleteSelection;
 
 
 
@@ -729,6 +730,8 @@ public class Messages extends NLS {
 
     public static String AggregationWizardPage_WITHOUT_CHILDREN;
 
+    public static String DeleteConfiguration_descriptionFromDescriptiveDataSet_onlyRemove;
+
     static {
         // initialize resource bundle
         NLS.initializeMessages(BUNDLE_NAME, Messages.class);
index 8face6cdf94cd888335409e45c3b5750aed8142d..4e0ee3b04e48752e4c734d4f8c7ec39b039996dc 100644 (file)
@@ -224,7 +224,9 @@ DeleteConfiguration_descriptiveDataSet_deleteAllSpecimenDesc=Specimen descriptio
 DeleteConfiguration_descriptiveDataSet_deleteAllLiteratureDesc=Literature descriptions
 DeleteConfiguration_descriptiveDataSet_deleteAllDefaultDesc=Default descriptions
 DeleteConfiguration_descriptiveDataSet_deleteAllAggregatedDesc=Aggregated descriptions
+DeleteConfiguration_descriptiveDataSet_deleteSelection=Fully delete the following related descriptions\nUnchecked descriptions stay in the database attached to their taxa/specimens:
 
+DeleteConfiguration_descriptionFromDescriptiveDataSet_onlyRemove=Remove description only from descriptive dataset
 NewGrantedAuthority_AlreadyInDb=The granted authority already exists.
 
 SetSecundumConfiguration_IncludeAcceptedTaxa=Include accepted taxa
index cf9390dc5d35fb54c2bddfa7565da7c2c21ac453..5ac75efecb02d0f0db100f2cd1a1790627f49bef 100644 (file)
@@ -222,8 +222,10 @@ DeleteTermBaseOperation_VOC_NOT_EMPTY=Vokabular ist nicht leer
 DeleteConfiguration_descriptiveDataSet_deleteAllSpecimenDesc=Specimen Beschreibungen
 DeleteConfiguration_descriptiveDataSet_deleteAllLiteratureDesc=Literatur Beschreibungen
 DeleteConfiguration_descriptiveDataSet_deleteAllDefaultDesc=Default Beschreibungen
-DeleteConfiguration_descriptiveDataSet_deleteAllAggregatedDesc=Aggregierten Beschreibungen 
+DeleteConfiguration_descriptiveDataSet_deleteAllAggregatedDesc=Aggregierte Beschreibungen 
+DeleteConfiguration_descriptiveDataSet_deleteSelection=Wählen Sie welche Beschreibungen komplett gelöscht werden sollen\nNicht ausgewählte Beschreibungen verbleiben in der Datenbank und verknüpft mit ihrem Beleg/Taxon:
 
+DeleteConfiguration_descriptionFromDescriptiveDataSet_onlyRemove=Entferne Beschriebungen nur aus dem Descriptive Dataset
 NewGrantedAuthority_AlreadyInDb=Die GrantedAuthority ist bereits in der DB enthalten.
 
 SetSecundumConfiguration_IncludeAcceptedTaxa=Anwenden auf akzeptierte Taxa
index 79d56439a136769442a0044820627fdbf00bd970..afe77f06f30b9f13dfd8e7dd5987ed36955a6723 100644 (file)
@@ -20,6 +20,7 @@ import eu.etaxonomy.cdm.api.service.config.DeleteConfiguratorBase;
 import eu.etaxonomy.cdm.api.service.config.DeleteDescriptiveDataSetConfigurator;
 import eu.etaxonomy.cdm.api.service.config.MediaDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.config.NameDeletionConfigurator;
+import eu.etaxonomy.cdm.api.service.config.RemoveDescriptionsFromDescriptiveDataSetConfigurator;
 import eu.etaxonomy.cdm.api.service.config.SpecimenDeleteConfigurator;
 import eu.etaxonomy.cdm.api.service.config.SynonymDeletionConfigurator;
 import eu.etaxonomy.cdm.api.service.config.TaxonDeletionConfigurator;
@@ -67,6 +68,8 @@ public class DeleteConfiguratorDialog extends MessageDialog{
             composite.addConfiguratorComposite(new DeleteMediaConfiguratorComposite((MediaDeletionConfigurator) configurator, composite.getSectionConfigure(), SWT.NONE, fromBulkEditor));
         } else if(configurator instanceof DeleteDescriptiveDataSetConfigurator){
             composite.addConfiguratorComposite(new DeleteDescriptiveDatasetConfiguratorComposite((DeleteDescriptiveDataSetConfigurator) configurator, composite.getSectionConfigure(), SWT.NONE));
+        }else if(configurator instanceof RemoveDescriptionsFromDescriptiveDataSetConfigurator){
+            composite.addConfiguratorComposite(new DeleteDescriptionFromDescriptiveDatasetConfiguratorComposite((RemoveDescriptionsFromDescriptiveDataSetConfigurator) configurator, composite.getSectionConfigure(), SWT.NONE));
         }
 
 
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteDescriptionFromDescriptiveDatasetConfiguratorComposite.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/deleteConfigurator/DeleteDescriptionFromDescriptiveDatasetConfiguratorComposite.java
new file mode 100755 (executable)
index 0000000..8a3466e
--- /dev/null
@@ -0,0 +1,72 @@
+/**
+* Copyright (C) 2020 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.ui.dialog.configurator.deleteConfigurator;
+
+import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.beans.PojoProperties;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.jface.databinding.swt.WidgetProperties;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+
+import eu.etaxonomy.cdm.api.service.config.RemoveDescriptionsFromDescriptiveDataSetConfigurator;
+import eu.etaxonomy.taxeditor.l10n.Messages;
+
+/**
+ * @author k.luther
+ * @since Jun 19, 2020
+ */
+public class DeleteDescriptionFromDescriptiveDatasetConfiguratorComposite extends Composite{
+
+    private final DataBindingContext m_bindingContext;
+
+    private final FormToolkit toolkit = new FormToolkit(Display.getCurrent());
+    private final RemoveDescriptionsFromDescriptiveDataSetConfigurator configurator;
+    private Button btnOnlyRemoveFromDataset;
+
+    public DeleteDescriptionFromDescriptiveDatasetConfiguratorComposite(RemoveDescriptionsFromDescriptiveDataSetConfigurator configurator, Composite parent, int style) {
+        super(parent, style);
+
+        this.configurator = configurator;
+        addDisposeListener(new DisposeListener() {
+            @Override
+            public void widgetDisposed(DisposeEvent e) {
+                toolkit.dispose();
+            }
+        });
+        toolkit.paintBordersFor(this);
+        setLayout(new RowLayout(SWT.VERTICAL));
+        setBackground(getBackground());
+
+
+
+
+        btnOnlyRemoveFromDataset = new Button(this, SWT.CHECK);
+        btnOnlyRemoveFromDataset.setText(Messages.DeleteConfiguration_descriptionFromDescriptiveDataSet_onlyRemove);
+        btnOnlyRemoveFromDataset.setEnabled(true);
+        btnOnlyRemoveFromDataset.setSelection(configurator.isOnlyRemoveDescriptionsFromDataSet());
+        m_bindingContext = initDataBindings();
+    }
+
+    protected DataBindingContext initDataBindings() {
+        DataBindingContext bindingContext = new DataBindingContext();
+
+        IObservableValue observeSelectionBtnDeleteAllSpecimen = WidgetProperties.selection().observe(btnOnlyRemoveFromDataset);
+        IObservableValue deleteAllSpecimenConfiguratorObserveValue = PojoProperties.value("onlyRemoveDescriptionsFromDataSet").observe(configurator);
+        bindingContext.bindValue(observeSelectionBtnDeleteAllSpecimen, deleteAllSpecimenConfiguratorObserveValue, null, null);
+        return bindingContext;
+    }
+
+}
index 89d17c421146cf76714819b72e70229e52a57c6d..5c0675107ae6320aab1bc8cd9e9b73efc1230285 100755 (executable)
@@ -19,6 +19,7 @@ import org.eclipse.swt.layout.RowLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
 import org.eclipse.ui.forms.widgets.FormToolkit;
 
 import eu.etaxonomy.cdm.api.service.config.DeleteDescriptiveDataSetConfigurator;
@@ -55,7 +56,8 @@ public class DeleteDescriptiveDatasetConfiguratorComposite extends Composite {
         setLayout(new RowLayout(SWT.VERTICAL));
         setBackground(getBackground());
 
-
+        Label lblDelete = new Label(this, SWT.NONE);
+        lblDelete.setText(Messages.DeleteConfiguration_descriptiveDataSet_deleteSelection);
 
 
         btnDeleteAllSpecimenDescriptions = new Button(this, SWT.CHECK);