fix compile errors and cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Wed, 29 Sep 2021 13:56:01 +0000 (15:56 +0200)
committerAndreas Müller <a.mueller@bgbm.org>
Wed, 29 Sep 2021 13:56:01 +0000 (15:56 +0200)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/handler/ConvertPerson2TeamHandlerE4.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixBottomToolbar.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/handler/AggregationHandler.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToAcceptedTaxonOperation.java
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/ChangeSynonymToConceptOperation.java
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/e4/handler/AggregateDistributionForSubTreeHandler.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/event/EventUtility.java
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/StoreUtil.java

index a6aef6159c32d0027dfbbdca8b5446ff9b17c151..b56c6e0aca3cd20398f48f313667045297015a71 100644 (file)
@@ -66,7 +66,7 @@ public class ConvertPerson2TeamHandlerE4 {
             } catch (MergeException e) {
                 MessagingUtils.informationDialog("Convert not possible", "Person can not be transformed into team. Probably it is referenced in a way that allows only persons. Check referencing objects view for details.");
             }
-            if (result != null &&result.isOk()){
+            if (result != null && result.isOk()){
                 team = (Team)result.getCdmEntity();
                 editor.getEditorInput().getModel().remove(person);
                 editor.getEditorInput().getModel().add(team);
index 532239a8da266f4bad6312af9b831b4391dee27b..12322b70a882a8e063314de6b3dcd0b4d55c390f 100644 (file)
@@ -47,7 +47,9 @@ import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
 import eu.etaxonomy.cdm.persistence.dto.TermDto;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
 import eu.etaxonomy.taxeditor.editor.l10n.Messages;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
+import eu.etaxonomy.taxeditor.operation.IFeedbackGenerator;
 import eu.etaxonomy.taxeditor.store.CdmStore;
 import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.ui.dialog.configurator.StructuredAggregationConfigurationWizard;
@@ -204,15 +206,10 @@ public class CharacterMatrixBottomToolbar extends Composite{
         config.setTaxonNodeFilter(filter);
 
         config.setDatasetUuid(matrix.getDescriptiveDataSet().getUuid());
-        config.setAggregateToHigherRanks(true);
-        config.setAggregationMode(AggregationMode.byAreasAndRanks());
+        config.setAggregationMode(AggregationMode.byWithinTaxonAndToParent());
         config.setAdaptBatchSize(false);
-        TaxonNodeDto node = null;
-        if (o instanceof TaxonNodeDto){
-            node =(TaxonNodeDto)o;
-        }
         StructuredAggregationConfigurationWizard aggregationWizard = new StructuredAggregationConfigurationWizard(config, this.matrix.getDescriptiveDataSet(), null);
-        WizardDialog dialog = new WizardDialog(StoreUtil.getShell(),
+        WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(),
                 aggregationWizard);
 
         int open = dialog.open();
@@ -232,7 +229,7 @@ public class CharacterMatrixBottomToolbar extends Composite{
                                 monitorUuid,
                                 50,
                                 null,
-                                (List)null,
+                                (List<IFeedbackGenerator>)null,
                                 subMonitor);
                 Object resultObject = remotingMonitor.getResult();
                 if(resultObject instanceof Exception){
index 4e0f05751b3d757f4304c4a1ce9f7bdfcb51c74c..5b33690b073376993917f332bdee6ee52b3ba520 100755 (executable)
@@ -43,10 +43,10 @@ import eu.etaxonomy.cdm.persistence.dto.TermDto;
 import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.CharacterMatrix;
 import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.CharacterMatrixPart;
 import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
+import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.MessagingUtils;
 import eu.etaxonomy.taxeditor.operation.IFeedbackGenerator;
 import eu.etaxonomy.taxeditor.store.CdmStore;
-import eu.etaxonomy.taxeditor.store.StoreUtil;
 import eu.etaxonomy.taxeditor.ui.dialog.configurator.StructuredAggregationConfigurationWizard;
 
 /**
@@ -83,7 +83,6 @@ public class AggregationHandler {
             }
         }
 
-
         if (!nodeDtos.isEmpty()){
             for (TaxonNodeDto dto: nodeDtos){
                 filter = filter.orSubtree(dto.getUuid());
@@ -96,12 +95,11 @@ public class AggregationHandler {
         config.setTaxonNodeFilter(filter);
 
         config.setDatasetUuid(matrix.getDescriptiveDataSet().getUuid());
-        config.setAggregateToHigherRanks(true);
-        config.setAggregationMode(AggregationMode.byAreasAndRanks());
+        config.setAggregationMode(AggregationMode.byWithinTaxonAndToParent());
         config.setAdaptBatchSize(false);
 
         StructuredAggregationConfigurationWizard aggregationWizard = new StructuredAggregationConfigurationWizard(config, matrix.getDescriptiveDataSet(), nodeDtos);
-        WizardDialog dialog = new WizardDialog(StoreUtil.getShell(),
+        WizardDialog dialog = new WizardDialog(AbstractUtility.getShell(),
                 aggregationWizard);
 
         int open = dialog.open();
@@ -146,14 +144,7 @@ public class AggregationHandler {
             }
             monitor.done();
         });
-//        job.addJobChangeListener(new JobChangeAdapter(){
-//            @Override
-//            public void done(IJobChangeEvent event) {
-//                CharacterMatrixBottomToolbar.this.getDisplay().asyncExec(()->{
-//                    matrix.redraw();
-//                });
-//            }
-//        });
+
         job.schedule();
     }
 
@@ -166,6 +157,5 @@ public class AggregationHandler {
                 !(selection.getFirstElement() instanceof TaxonRowWrapperDTO) );
 
         return canExecute;
-
     }
-}
+}
\ No newline at end of file
index a49db582aedc744de279a58acaf6f3586e2f23de..fe5bc189f79dc154ff3e68d4bfdc13ffde63b242 100644 (file)
@@ -84,7 +84,6 @@ public class ChangeSynonymToAcceptedTaxonOperation extends AbstractPersistentPos
        public IStatus execute(IProgressMonitor monitor, IAdaptable info)
                        throws ExecutionException {
 
-
                UpdateResult result;
                try {
                        result = CdmStore.getService(ITaxonService.class).changeSynonymToAcceptedTaxon(synonym.getUuid(),
index 3e23a498a54c4c392593d00c2f25d367be7d11e1..1809a2e1e0a5b1d6483564cb854ea3c7fa6af6ba 100644 (file)
@@ -6,7 +6,6 @@
 * 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.editor.name.operation;
 
 import org.eclipse.core.commands.ExecutionException;
index b3fdc45ec360d5da5ca87e89e1e93b1f3b305f41..88ea9031a7ed3555d763bd8b7b9bbda8efb4ac63 100755 (executable)
@@ -46,23 +46,16 @@ import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart;
  */
 public class AggregateDistributionForSubTreeHandler extends CdmHandlerE4 {
 
-
-
     private TaxonNodeDto taxonNode;
     private DistributionAggregationConfiguration configurator;
     private static final String NO = Messages.NO;
     private static final String CANCEL = Messages.RemotingMoveTaxonNodeHandler_CANCEL;
     private static final String YES = Messages.YES;
 
-    /**
-     * @param label
-     */
     public AggregateDistributionForSubTreeHandler() {
         super("");
-
     }
 
-
     @Override
     public IStatus allowOperations(IStructuredSelection selection, Shell shell, MPart activePart,
             MHandledMenuItem menuItem) {
@@ -112,8 +105,7 @@ public class AggregateDistributionForSubTreeHandler extends CdmHandlerE4 {
             }
         }
 
-
-        configurator = DistributionAggregationConfiguration.NewInstance(AggregationMode.byAreasAndRanks(), null, TaxonNodeFilter.NewSubtreeInstance(taxonNode.getUuid()), null);
+        configurator = DistributionAggregationConfiguration.NewInstance(AggregationMode.byWithinTaxonAndToParent(), null, TaxonNodeFilter.NewSubtreeInstance(taxonNode.getUuid()), null);
         DistributionAggregationConfiguratorWizard wizard = new DistributionAggregationConfiguratorWizard(configurator);
 
         WizardDialog dialog = new WizardDialog(shell, wizard);
@@ -135,7 +127,6 @@ public class AggregateDistributionForSubTreeHandler extends CdmHandlerE4 {
     @Override
     public void onComplete() {
         // TODO Auto-generated method stub
-
     }
 
     @Override
index 8588c149f457208526cc2922cc0b3b67c7e9edc4..23d35764ac948f5f4353541d6ed0f43e7f986343 100644 (file)
@@ -27,7 +27,6 @@ import eu.etaxonomy.taxeditor.editor.ITaxonEditor;
 /**
  * @author pplitzner
  * @since Sep 4, 2017
- *
  */
 public class EventUtility {
 
index 7ebc928b7c13e7e8140de26f707d1ef2c2704cde..75ef8d37f5f7f92dff3199ff29aed32ba23c2a80 100644 (file)
@@ -94,7 +94,6 @@ public class StoreUtil extends AbstractUtility {
                 scrolledForm.reflow(flushCashes);
                 scrolledForm.redraw();
             }
-
         }
     }