} 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);
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;
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();
monitorUuid,
50,
null,
- (List)null,
+ (List<IFeedbackGenerator>)null,
subMonitor);
Object resultObject = remotingMonitor.getResult();
if(resultObject instanceof Exception){
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;
/**
}
}
-
if (!nodeDtos.isEmpty()){
for (TaxonNodeDto dto: nodeDtos){
filter = filter.orSubtree(dto.getUuid());
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();
}
monitor.done();
});
-// job.addJobChangeListener(new JobChangeAdapter(){
-// @Override
-// public void done(IJobChangeEvent event) {
-// CharacterMatrixBottomToolbar.this.getDisplay().asyncExec(()->{
-// matrix.redraw();
-// });
-// }
-// });
+
job.schedule();
}
!(selection.getFirstElement() instanceof TaxonRowWrapperDTO) );
return canExecute;
-
}
-}
+}
\ No newline at end of file
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
-
UpdateResult result;
try {
result = CdmStore.getService(ITaxonService.class).changeSynonymToAcceptedTaxon(synonym.getUuid(),
* 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;
*/
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) {
}
}
-
- 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);
@Override
public void onComplete() {
// TODO Auto-generated method stub
-
}
@Override
/**
* @author pplitzner
* @since Sep 4, 2017
- *
*/
public class EventUtility {
scrolledForm.reflow(flushCashes);
scrolledForm.redraw();
}
-
}
}