Revision 9bd56314
Added by Andreas Müller over 2 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/handler/AggregationHandler.java | ||
---|---|---|
44 | 44 |
import eu.etaxonomy.taxeditor.editor.descriptiveDataSet.matrix.CharacterMatrixPart; |
45 | 45 |
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin; |
46 | 46 |
import eu.etaxonomy.taxeditor.model.MessagingUtils; |
47 |
import eu.etaxonomy.taxeditor.operation.IFeedbackGenerator; |
|
47 | 48 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
48 | 49 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
49 | 50 |
import eu.etaxonomy.taxeditor.ui.dialog.configurator.StructuredAggregationConfigurationWizard; |
... | ... | |
66 | 67 |
IStructuredSelection sel = matrix.getSelection(); |
67 | 68 |
// Object o = sel.getFirstElement(); |
68 | 69 |
List<TaxonNodeDto> nodeDtos = new ArrayList<>(); |
69 |
Iterator iterator = sel.iterator(); |
|
70 |
Iterator<?> iterator = sel.iterator();
|
|
70 | 71 |
while (iterator.hasNext()){ |
71 | 72 |
Object o = iterator.next(); |
72 | 73 |
if (o instanceof TaxonNodeDto){ |
... | ... | |
98 | 99 |
config.setAggregateToHigherRanks(true); |
99 | 100 |
config.setAggregationMode(AggregationMode.byAreasAndRanks()); |
100 | 101 |
config.setAdaptBatchSize(false); |
101 |
TaxonNodeDto node = null; |
|
102 | 102 |
|
103 | 103 |
StructuredAggregationConfigurationWizard aggregationWizard = new StructuredAggregationConfigurationWizard(config, matrix.getDescriptiveDataSet(), nodeDtos); |
104 | 104 |
WizardDialog dialog = new WizardDialog(StoreUtil.getShell(), |
... | ... | |
121 | 121 |
monitorUuid, |
122 | 122 |
50, |
123 | 123 |
null, |
124 |
(List)null, |
|
124 |
(List<IFeedbackGenerator>)null,
|
|
125 | 125 |
subMonitor); |
126 | 126 |
Object resultObject = remotingMonitor.getResult(); |
127 | 127 |
if(resultObject instanceof Exception){ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/StructuredAggregationConfigurationWizard.java | ||
---|---|---|
48 | 48 |
this.selectedNodes = nodes; |
49 | 49 |
} |
50 | 50 |
|
51 |
|
|
52 |
|
|
53 | 51 |
@Override |
54 | 52 |
public void postOperation(IRemotingProgressMonitor monitor) { |
55 | 53 |
// TODO Auto-generated method stub |
56 |
|
|
57 | 54 |
} |
58 | 55 |
|
59 | 56 |
@Override |
... | ... | |
62 | 59 |
configurator.setAggregationMode(page.getAggregationMode()); |
63 | 60 |
configurator.setToParentSourceMode(page.getSourceModeChildParent()); |
64 | 61 |
|
65 |
|
|
66 |
|
|
67 | 62 |
// for (TaxonNode taxonNode : matrix.getDescriptiveDataSet().getTaxonSubtreeFilter()) { |
68 | 63 |
// filter = filter.orSubtree(taxonNode); |
69 | 64 |
// } |
... | ... | |
100 | 95 |
configurator.setTaxonNodeFilter(filter); |
101 | 96 |
} |
102 | 97 |
|
103 |
|
|
104 |
|
|
105 | 98 |
return true; |
106 | 99 |
} |
107 | 100 |
|
... | ... | |
109 | 102 |
public void addPages() { |
110 | 103 |
page = new StructuredDescriptionAggregationConfigurationWizardPage(configurator, selectedNodes); |
111 | 104 |
addPage(page); |
112 |
|
|
113 | 105 |
} |
114 |
} |
|
106 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/configurator/StructuredDescriptionAggregationConfigurationWizardPage.java | ||
---|---|---|
50 | 50 |
protected CheckboxTableViewer subTreeSelectionViewer; |
51 | 51 |
private List<TaxonNodeDto> selectedNodes; |
52 | 52 |
|
53 |
|
|
54 |
|
|
55 |
/** |
|
56 |
* @param pageName |
|
57 |
*/ |
|
58 | 53 |
protected StructuredDescriptionAggregationConfigurationWizardPage(StructuredDescriptionAggregationConfiguration configurator, List<TaxonNodeDto> nodes) { |
59 | 54 |
super(Messages.DistributionAggregationWizardPage_TITLE); |
60 | 55 |
this.configurator = configurator; |
... | ... | |
62 | 57 |
selectedNodes = nodes; |
63 | 58 |
} |
64 | 59 |
|
65 |
|
|
66 |
|
|
67 |
|
|
68 | 60 |
@Override |
69 | 61 |
public void createControl(Composite parent) { |
70 | 62 |
final Composite control = new Composite(parent, SWT.NULL); |
... | ... | |
138 | 130 |
|
139 | 131 |
}); |
140 | 132 |
|
141 |
|
|
142 |
|
|
143 |
|
|
144 | 133 |
if (selectedNodes == null || selectedNodes.isEmpty()){ |
145 | 134 |
List<TaxonNode> nodeList; |
146 | 135 |
List<UUID> uuidList = new ArrayList<>(); |
... | ... | |
182 | 171 |
} |
183 | 172 |
}); |
184 | 173 |
|
185 |
|
|
186 |
|
|
187 |
|
|
188 | 174 |
GridLayoutFactory.fillDefaults(); |
189 | 175 |
|
190 | 176 |
Label higherRankLabel = new Label(control, SWT.NULL); |
Also available in: Unified diff
cleanup