1 |
f2e0fed4
|
Patrick Plitzner
|
/**
|
2 |
|
|
* Copyright (C) 2018 EDIT
|
3 |
|
|
* European Distributed Institute of Taxonomy
|
4 |
|
|
* http://www.e-taxonomy.eu
|
5 |
|
|
*
|
6 |
|
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7 |
|
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8 |
|
|
*/
|
9 |
|
|
package eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix;
|
10 |
|
|
|
11 |
|
|
import java.util.Collection;
|
12 |
|
|
import java.util.List;
|
13 |
34c65e31
|
pplitzner
|
import java.util.Set;
|
14 |
1acb2d39
|
Patrick Plitzner
|
import java.util.UUID;
|
15 |
ddb0eef3
|
pplitzner
|
import java.util.stream.Collectors;
|
16 |
f2e0fed4
|
Patrick Plitzner
|
|
17 |
16bef6ee
|
Patrick Plitzner
|
import org.eclipse.core.runtime.ICoreRunnable;
|
18 |
|
|
import org.eclipse.core.runtime.IProgressMonitor;
|
19 |
|
|
import org.eclipse.core.runtime.SubMonitor;
|
20 |
|
|
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
|
21 |
|
|
import org.eclipse.core.runtime.jobs.Job;
|
22 |
|
|
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
|
23 |
f2e0fed4
|
Patrick Plitzner
|
import org.eclipse.jface.layout.GridDataFactory;
|
24 |
86bbdab9
|
Katja Luther
|
import org.eclipse.jface.viewers.IStructuredSelection;
|
25 |
f2e0fed4
|
Patrick Plitzner
|
import org.eclipse.jface.window.Window;
|
26 |
86bbdab9
|
Katja Luther
|
import org.eclipse.jface.wizard.WizardDialog;
|
27 |
f2e0fed4
|
Patrick Plitzner
|
import org.eclipse.swt.SWT;
|
28 |
|
|
import org.eclipse.swt.events.SelectionAdapter;
|
29 |
|
|
import org.eclipse.swt.events.SelectionEvent;
|
30 |
|
|
import org.eclipse.swt.layout.RowLayout;
|
31 |
|
|
import org.eclipse.swt.widgets.Button;
|
32 |
|
|
import org.eclipse.swt.widgets.Composite;
|
33 |
|
|
|
34 |
16bef6ee
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.api.application.CdmApplicationState;
|
35 |
34c65e31
|
pplitzner
|
import eu.etaxonomy.cdm.api.service.ITaxonNodeService;
|
36 |
1acb2d39
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.api.service.UpdateResult;
|
37 |
de4502ef
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.api.service.description.AggregationMode;
|
38 |
4eedd13b
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.api.service.description.StructuredDescriptionAggregationConfiguration;
|
39 |
16bef6ee
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor;
|
40 |
46ae6d5a
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.filter.TaxonNodeFilter;
|
41 |
93040e10
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.model.description.DescriptiveDataSet;
|
42 |
07b9b244
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.model.location.NamedArea;
|
43 |
34c65e31
|
pplitzner
|
import eu.etaxonomy.cdm.model.taxon.Taxon;
|
44 |
46ae6d5a
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
|
45 |
f2e0fed4
|
Patrick Plitzner
|
import eu.etaxonomy.cdm.persistence.dto.SpecimenNodeWrapper;
|
46 |
34c65e31
|
pplitzner
|
import eu.etaxonomy.cdm.persistence.dto.TaxonNodeDto;
|
47 |
2ac046d4
|
Patrick Plitzner
|
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
|
48 |
a8858124
|
Patrick Plitzner
|
import eu.etaxonomy.taxeditor.editor.l10n.Messages;
|
49 |
f2e0fed4
|
Patrick Plitzner
|
import eu.etaxonomy.taxeditor.model.MessagingUtils;
|
50 |
|
|
import eu.etaxonomy.taxeditor.store.CdmStore;
|
51 |
076adbba
|
Patrick Plitzner
|
import eu.etaxonomy.taxeditor.store.StoreUtil;
|
52 |
86bbdab9
|
Katja Luther
|
import eu.etaxonomy.taxeditor.ui.dialog.configurator.StructuredAggregationConfigurationWizard;
|
53 |
34c65e31
|
pplitzner
|
import eu.etaxonomy.taxeditor.ui.dialog.selection.TaxonSelectionDialog;
|
54 |
f2e0fed4
|
Patrick Plitzner
|
|
55 |
|
|
/**
|
56 |
|
|
* @author pplitzner
|
57 |
|
|
* @since Jul 9, 2018
|
58 |
|
|
*/
|
59 |
|
|
public class CharacterMatrixBottomToolbar extends Composite{
|
60 |
|
|
|
61 |
|
|
private CharacterMatrix matrix;
|
62 |
|
|
|
63 |
|
|
public CharacterMatrixBottomToolbar(CharacterMatrix matrix, int style) {
|
64 |
|
|
super(matrix, style);
|
65 |
|
|
this.matrix = matrix;
|
66 |
|
|
|
67 |
|
|
init();
|
68 |
|
|
}
|
69 |
|
|
|
70 |
|
|
private void init() {
|
71 |
|
|
|
72 |
|
|
setLayout(new RowLayout());
|
73 |
|
|
GridDataFactory.fillDefaults().grab(true, false).applyTo(this);
|
74 |
|
|
|
75 |
f2ac0034
|
Katja Luther
|
// /**
|
76 |
|
|
// * Add description button
|
77 |
|
|
// */
|
78 |
|
|
// Button btnAddDescription = new Button(this, SWT.PUSH);
|
79 |
|
|
// btnAddDescription.setImage(ImageResources.getImage(ImageResources.ADD_ICON_GREEN));
|
80 |
|
|
// btnAddDescription.addSelectionListener(new SelectionAdapter() {
|
81 |
|
|
// @Override
|
82 |
|
|
// public void widgetSelected(SelectionEvent e) {
|
83 |
|
|
// if(StoreUtil.promptCheckIsDirty(matrix.getPart())){
|
84 |
|
|
// return;
|
85 |
|
|
// }
|
86 |
|
|
// SpecimenSelectionDialog dialog = new SpecimenSelectionDialog(matrix.getShell(), matrix, null);
|
87 |
|
|
// if(dialog.open()==Window.OK){
|
88 |
|
|
// Collection<SpecimenNodeWrapper> wrappers = dialog.getSpecimen();
|
89 |
|
|
// if(wrappers.stream().anyMatch(wrapper->wrapper.getTaxonDescriptionUuid()==null)
|
90 |
|
|
// && !MessagingUtils.confirmDialog(
|
91 |
|
|
// "Create Taxon Association",
|
92 |
|
|
// "Some specimens are not linked with taxon via IndividualsAssociation yet.\n"
|
93 |
|
|
// + "Do you want to create this association?")){
|
94 |
|
|
// return;
|
95 |
|
|
// }
|
96 |
|
|
// addRowsToMatrix(wrappers, matrix.getDescriptiveDataSet().getUuid());
|
97 |
|
|
// wrappers.forEach(wrapper->matrix.getSpecimenCache().remove(wrapper));
|
98 |
|
|
// }
|
99 |
|
|
// }
|
100 |
|
|
// });
|
101 |
f2e0fed4
|
Patrick Plitzner
|
/**
|
102 |
|
|
* Remove description button
|
103 |
|
|
*/
|
104 |
f2ac0034
|
Katja Luther
|
// Button btnRemoveDescription = new Button(this, SWT.PUSH);
|
105 |
|
|
// btnRemoveDescription.setImage(ImageResources.getImage(ImageResources.ACTIVE_DELETE_ICON));
|
106 |
|
|
// btnRemoveDescription.addSelectionListener(new SelectionAdapter() {
|
107 |
|
|
// @Override
|
108 |
|
|
// public void widgetSelected(SelectionEvent e) {
|
109 |
|
|
// if(StoreUtil.promptCheckIsDirty(matrix.getPart())){
|
110 |
|
|
// return;
|
111 |
|
|
// }
|
112 |
|
|
// if(!MessagingUtils.confirmDialog(Messages.CharacterMatrixBottomToolbar_CONFIRM_DELETE_TITLE, Messages.CharacterMatrixBottomToolbar_CONFIRM_DELETE_MESSAGE)){
|
113 |
|
|
// return;
|
114 |
|
|
// }
|
115 |
|
|
// int[] fullySelectedRowPositions = matrix.getBodyLayer().getSelectionLayer().getFullySelectedRowPositions();
|
116 |
|
|
// List<RowWrapperDTO> toRemove = new ArrayList<>();
|
117 |
|
|
// for (int i : fullySelectedRowPositions) {
|
118 |
|
|
// Object rowObject = matrix.getBodyDataProvider().getRowObject(i);
|
119 |
|
|
// if(rowObject instanceof RowWrapperDTO){
|
120 |
|
|
// toRemove.add((RowWrapperDTO) rowObject);
|
121 |
|
|
// }
|
122 |
|
|
// }
|
123 |
|
|
// toRemove.forEach(rowToRemove -> {
|
124 |
|
|
// matrix.putDescriptionToDelete(rowToRemove.getDescription().getUuid());
|
125 |
|
|
// matrix.getDescriptions().remove(rowToRemove);
|
126 |
|
|
// matrix.setDirty();
|
127 |
|
|
//// CdmStore.getService(IDescriptiveDataSetService.class).removeDescription(
|
128 |
|
|
//// rowToRemove.getDescription().getUuid(), matrix.getDescriptiveDataSet().getUuid());
|
129 |
|
|
// });
|
130 |
|
|
// }
|
131 |
|
|
// });
|
132 |
25bd222a
|
Patrick Plitzner
|
/**
|
133 |
|
|
* Aggregate button
|
134 |
|
|
*/
|
135 |
|
|
Button btnAggregate = new Button(this, SWT.PUSH);
|
136 |
a8858124
|
Patrick Plitzner
|
btnAggregate.setText(Messages.CharacterMatrixBottomToolbar_AGGREGATE);
|
137 |
25bd222a
|
Patrick Plitzner
|
btnAggregate.addSelectionListener(new SelectionAdapter() {
|
138 |
|
|
@Override
|
139 |
|
|
public void widgetSelected(SelectionEvent e) {
|
140 |
328bcdec
|
Patrick Plitzner
|
if(StoreUtil.promptCheckIsDirty(matrix.getPart())){
|
141 |
076adbba
|
Patrick Plitzner
|
return;
|
142 |
|
|
}
|
143 |
16bef6ee
|
Patrick Plitzner
|
aggregatDescriptiveDataSet(matrix.getDescriptiveDataSet().getUuid());
|
144 |
25bd222a
|
Patrick Plitzner
|
}
|
145 |
|
|
});
|
146 |
2c450f49
|
Patrick Plitzner
|
/**
|
147 |
|
|
* Key generation button
|
148 |
|
|
*/
|
149 |
|
|
Button btnGenerateKey = new Button(this, SWT.PUSH);
|
150 |
|
|
btnGenerateKey.setText("Generate Polytomous Key");
|
151 |
|
|
btnGenerateKey.addSelectionListener(new SelectionAdapter() {
|
152 |
|
|
@Override
|
153 |
|
|
public void widgetSelected(SelectionEvent e) {
|
154 |
|
|
if(StoreUtil.promptCheckIsDirty(matrix.getPart())){
|
155 |
|
|
return;
|
156 |
|
|
}
|
157 |
|
|
Set<TaxonNodeDto> nodeDtos = matrix.getDescriptiveDataSet().getTaxonSubtreeFilter().stream()
|
158 |
|
|
.map(node->new TaxonNodeDto(node))
|
159 |
|
|
.collect(Collectors.toSet());
|
160 |
|
|
TaxonNodeDto parentDto = CdmStore.getService(ITaxonNodeService.class).findCommonParentDto(nodeDtos);
|
161 |
|
|
UUID taxonUuid = parentDto.getTaxonUuid();
|
162 |
|
|
int response = MessagingUtils.confirmDialog(
|
163 |
|
|
"Choose taxonomic scope",
|
164 |
|
|
String.format("The common parent taxon of this data set is :\n%s\n\n"
|
165 |
|
|
+ "Do you want to use this as the taxonomic scope for the polytomous key?"
|
166 |
|
|
, parentDto.getTaxonTitleCache()), "Yes", "Choose different taxon", "Cancel");
|
167 |
|
|
if(response==2){
|
168 |
|
|
return;
|
169 |
|
|
}
|
170 |
|
|
else if(response==1){
|
171 |
|
|
Taxon taxon = TaxonSelectionDialog.selectTaxon(getShell(), null);
|
172 |
|
|
if(taxon==null){
|
173 |
34c65e31
|
pplitzner
|
return;
|
174 |
|
|
}
|
175 |
2c450f49
|
Patrick Plitzner
|
taxonUuid = taxon.getUuid();
|
176 |
93040e10
|
Patrick Plitzner
|
}
|
177 |
2c450f49
|
Patrick Plitzner
|
generateKey(matrix.getDescriptiveDataSet().getUuid(), taxonUuid);
|
178 |
|
|
}
|
179 |
8ab41788
|
Patrick Plitzner
|
|
180 |
2c450f49
|
Patrick Plitzner
|
});
|
181 |
f2e0fed4
|
Patrick Plitzner
|
}
|
182 |
bd5a558a
|
Patrick Plitzner
|
|
183 |
16bef6ee
|
Patrick Plitzner
|
private void aggregatDescriptiveDataSet(UUID descriptiveDataSetUuid){
|
184 |
f8c40685
|
Katja Luther
|
|
185 |
4eedd13b
|
Patrick Plitzner
|
StructuredDescriptionAggregationConfiguration config = StructuredDescriptionAggregationConfiguration.NewInstance(
|
186 |
|
|
null, null);
|
187 |
86bbdab9
|
Katja Luther
|
IStructuredSelection sel = matrix.getSelection();
|
188 |
|
|
Object o = sel.getFirstElement();
|
189 |
07b9b244
|
Patrick Plitzner
|
TaxonNodeFilter filter = TaxonNodeFilter.NewRankInstance(matrix.getDescriptiveDataSet().getMinRank(),
|
190 |
|
|
matrix.getDescriptiveDataSet().getMaxRank());
|
191 |
|
|
for (NamedArea namedArea : matrix.getDescriptiveDataSet().getGeoFilter()) {
|
192 |
|
|
filter = filter.orArea(namedArea.getUuid());
|
193 |
|
|
}
|
194 |
86bbdab9
|
Katja Luther
|
// for (TaxonNode taxonNode : matrix.getDescriptiveDataSet().getTaxonSubtreeFilter()) {
|
195 |
|
|
// filter = filter.orSubtree(taxonNode);
|
196 |
|
|
// }
|
197 |
|
|
|
198 |
|
|
if (o instanceof TaxonNodeDto){
|
199 |
|
|
filter = filter.orSubtree(CdmStore.getService(ITaxonNodeService.class).load(((TaxonNodeDto)o).getUuid()));
|
200 |
|
|
}else{
|
201 |
|
|
for (TaxonNode taxonNode : matrix.getDescriptiveDataSet().getTaxonSubtreeFilter()) {
|
202 |
|
|
filter = filter.orSubtree(taxonNode);
|
203 |
|
|
}
|
204 |
46ae6d5a
|
Patrick Plitzner
|
}
|
205 |
|
|
config.setTaxonNodeFilter(filter);
|
206 |
|
|
|
207 |
86bbdab9
|
Katja Luther
|
config.setDatasetUuid(matrix.getDescriptiveDataSet().getUuid());
|
208 |
|
|
config.setAggregateToHigherRanks(true);
|
209 |
|
|
config.setAggregationMode(AggregationMode.byAreasAndRanks());
|
210 |
|
|
config.setAdaptBatchSize(false);
|
211 |
f8c40685
|
Katja Luther
|
TaxonNodeDto node = null;
|
212 |
|
|
if (o instanceof TaxonNodeDto){
|
213 |
|
|
node =(TaxonNodeDto)o;
|
214 |
|
|
}
|
215 |
|
|
StructuredAggregationConfigurationWizard aggregationWizard = new StructuredAggregationConfigurationWizard(config, this.matrix.getDescriptiveDataSet(), null);
|
216 |
86bbdab9
|
Katja Luther
|
WizardDialog dialog = new WizardDialog(StoreUtil.getShell(),
|
217 |
|
|
aggregationWizard);
|
218 |
|
|
|
219 |
|
|
int open = dialog.open();
|
220 |
|
|
if (open != Window.OK){
|
221 |
|
|
return;
|
222 |
|
|
}
|
223 |
4eedd13b
|
Patrick Plitzner
|
UUID monitorUuid = CdmApplicationState.getLongRunningTasksService().invoke(config);
|
224 |
16bef6ee
|
Patrick Plitzner
|
|
225 |
|
|
String jobLabel = "Aggregate Descriptive Data Set";
|
226 |
|
|
Job job = Job.create(jobLabel, (ICoreRunnable) monitor -> {
|
227 |
|
|
SubMonitor subMonitor = SubMonitor.convert(monitor);
|
228 |
|
|
subMonitor.beginTask(jobLabel, IProgressMonitor.UNKNOWN);
|
229 |
|
|
IRemotingProgressMonitor remotingMonitor;
|
230 |
|
|
try {
|
231 |
|
|
remotingMonitor = CdmStore.getProgressMonitorClientManager()
|
232 |
|
|
.pollMonitor(jobLabel,
|
233 |
|
|
monitorUuid,
|
234 |
|
|
50,
|
235 |
|
|
null,
|
236 |
|
|
(List)null,
|
237 |
|
|
subMonitor);
|
238 |
528e8632
|
Patrick Plitzner
|
Object resultObject = remotingMonitor.getResult();
|
239 |
|
|
if(resultObject instanceof Exception){
|
240 |
|
|
MessagingUtils.errorDialog("Aggregation failed", this, "Aggregation was not successfull", TaxeditorEditorPlugin.PLUGIN_ID, (Exception)resultObject, true, true);
|
241 |
|
|
}
|
242 |
|
|
else if(resultObject instanceof UpdateResult){
|
243 |
40f360dd
|
pplitzner
|
DescriptiveDataSet dataSet = (DescriptiveDataSet) ((UpdateResult) resultObject).getCdmEntity();
|
244 |
|
|
dataSet = matrix.getCdmEntitiySession().load(dataSet, true);
|
245 |
|
|
// update local dataset
|
246 |
|
|
matrix.setDescriptiveDataSet(dataSet);
|
247 |
9370d21c
|
Katja Luther
|
matrix.loadDescriptions(false, false);
|
248 |
528e8632
|
Patrick Plitzner
|
}
|
249 |
ddb0eef3
|
pplitzner
|
} catch (InterruptedException e) {
|
250 |
|
|
return;
|
251 |
|
|
}
|
252 |
|
|
monitor.done();
|
253 |
|
|
});
|
254 |
|
|
job.addJobChangeListener(new JobChangeAdapter(){
|
255 |
|
|
@Override
|
256 |
|
|
public void done(IJobChangeEvent event) {
|
257 |
|
|
CharacterMatrixBottomToolbar.this.getDisplay().asyncExec(()->{
|
258 |
|
|
matrix.redraw();
|
259 |
|
|
});
|
260 |
|
|
}
|
261 |
|
|
});
|
262 |
|
|
job.schedule();
|
263 |
|
|
}
|
264 |
|
|
|
265 |
|
|
private void addRowsToMatrix(Collection<SpecimenNodeWrapper> wrappers, UUID descriptiveDataSetUuid){
|
266 |
|
|
UUID monitorUuid = CdmApplicationState.getLongRunningTasksService().addRowWrapperToDataset(wrappers, descriptiveDataSetUuid);
|
267 |
|
|
|
268 |
|
|
String jobLabel = "Add specimens to matrix";
|
269 |
|
|
Job job = Job.create(jobLabel, (ICoreRunnable) monitor -> {
|
270 |
|
|
SubMonitor subMonitor = SubMonitor.convert(monitor);
|
271 |
|
|
subMonitor.beginTask(jobLabel, IProgressMonitor.UNKNOWN);
|
272 |
|
|
IRemotingProgressMonitor remotingMonitor;
|
273 |
|
|
try {
|
274 |
|
|
remotingMonitor = CdmStore.getProgressMonitorClientManager()
|
275 |
|
|
.pollMonitor(jobLabel,
|
276 |
|
|
monitorUuid,
|
277 |
|
|
50,
|
278 |
|
|
null,
|
279 |
|
|
(List)null,
|
280 |
|
|
subMonitor);
|
281 |
|
|
Object resultObject = remotingMonitor.getResult();
|
282 |
|
|
if(resultObject instanceof Exception){
|
283 |
|
|
MessagingUtils.errorDialog("Adding specimens failed", this, "Adding specimens was not successfull", TaxeditorEditorPlugin.PLUGIN_ID, (Exception)resultObject, true, true);
|
284 |
|
|
}
|
285 |
|
|
else if(resultObject instanceof UpdateResult){
|
286 |
|
|
UpdateResult result = (UpdateResult)resultObject;
|
287 |
|
|
if(!result.getExceptions().isEmpty()){
|
288 |
|
|
MessagingUtils.warningDialog(Messages.CharacterMatrixBottomToolbar_ERROR_ROW_CREATION_TITLE, this,
|
289 |
|
|
String.format(Messages.CharacterMatrixBottomToolbar_ERROR_ROW_CREATION_MESSAGE, result.getExceptions()
|
290 |
|
|
.stream().map(ex->ex.toString())
|
291 |
|
|
.collect(Collectors.joining("\n"))));
|
292 |
|
|
}
|
293 |
40f360dd
|
pplitzner
|
DescriptiveDataSet dataSet = (DescriptiveDataSet) result.getCdmEntity();
|
294 |
|
|
dataSet = matrix.getCdmEntitiySession().load(dataSet, true);
|
295 |
c1bf973e
|
pplitzner
|
// update local dataset
|
296 |
40f360dd
|
pplitzner
|
matrix.setDescriptiveDataSet(dataSet);
|
297 |
9370d21c
|
Katja Luther
|
matrix.loadDescriptions(false, false);
|
298 |
ddb0eef3
|
pplitzner
|
}
|
299 |
16bef6ee
|
Patrick Plitzner
|
} catch (InterruptedException e) {
|
300 |
|
|
return;
|
301 |
|
|
}
|
302 |
|
|
monitor.done();
|
303 |
|
|
});
|
304 |
|
|
job.addJobChangeListener(new JobChangeAdapter(){
|
305 |
|
|
@Override
|
306 |
|
|
public void done(IJobChangeEvent event) {
|
307 |
|
|
CharacterMatrixBottomToolbar.this.getDisplay().asyncExec(()->{
|
308 |
|
|
matrix.redraw();
|
309 |
|
|
});
|
310 |
|
|
}
|
311 |
|
|
});
|
312 |
|
|
job.schedule();
|
313 |
|
|
}
|
314 |
|
|
|
315 |
8ab41788
|
Patrick Plitzner
|
private void generateKey(UUID datasetUuid, UUID taxonUuid) {
|
316 |
|
|
|
317 |
|
|
UUID monitorUuid = CdmApplicationState.getLongRunningTasksService().generatePolytomousKey(datasetUuid, taxonUuid);
|
318 |
|
|
|
319 |
|
|
String jobLabel = "Generate polytomous key";
|
320 |
|
|
Job job = Job.create(jobLabel, (ICoreRunnable) monitor -> {
|
321 |
|
|
SubMonitor subMonitor = SubMonitor.convert(monitor);
|
322 |
|
|
subMonitor.beginTask(jobLabel, IProgressMonitor.UNKNOWN);
|
323 |
|
|
IRemotingProgressMonitor remotingMonitor;
|
324 |
|
|
try {
|
325 |
|
|
remotingMonitor = CdmStore.getProgressMonitorClientManager()
|
326 |
|
|
.pollMonitor(jobLabel,
|
327 |
|
|
monitorUuid,
|
328 |
|
|
50,
|
329 |
|
|
null,
|
330 |
|
|
(List)null,
|
331 |
|
|
subMonitor);
|
332 |
|
|
Object resultObject = remotingMonitor.getResult();
|
333 |
|
|
if(resultObject instanceof Exception){
|
334 |
|
|
MessagingUtils.errorDialog("Key generation failed", this, "Generating the polytomous key was not successfull", TaxeditorEditorPlugin.PLUGIN_ID, (Exception)resultObject, true, true);
|
335 |
|
|
}
|
336 |
|
|
} catch (InterruptedException e) {
|
337 |
|
|
return;
|
338 |
|
|
}
|
339 |
|
|
monitor.done();
|
340 |
|
|
});
|
341 |
|
|
job.schedule();
|
342 |
|
|
|
343 |
|
|
}
|
344 |
|
|
|
345 |
f2e0fed4
|
Patrick Plitzner
|
}
|