Revision 5aeccadc
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/TaxonNodeSelectionDialog.java | ||
---|---|---|
8 | 8 |
import java.util.List; |
9 | 9 |
import java.util.UUID; |
10 | 10 |
|
11 |
import org.eclipse.core.runtime.CoreException; |
|
11 | 12 |
import org.eclipse.jface.viewers.ILabelProvider; |
12 | 13 |
import org.eclipse.swt.SWT; |
13 | 14 |
import org.eclipse.swt.events.SelectionEvent; |
... | ... | |
63 | 64 |
if(classification != null){ |
64 | 65 |
selectedClassification = classification; |
65 | 66 |
} |
66 |
search(); |
|
67 |
|
|
68 |
fillClassifications(); |
|
69 |
createClassificationSelectionCombo(shell); |
|
67 | 70 |
} |
68 | 71 |
|
69 | 72 |
/** {@inheritDoc} */ |
70 | 73 |
@Override |
71 |
protected Control createExtendedContentArea(Composite parent) { |
|
72 |
return createClassificationSelectionCombo(parent); |
|
74 |
protected Control createDialogArea(Composite parent) { |
|
75 |
Composite container = (Composite) super.createDialogArea(parent); |
|
76 |
return createClassificationSelectionCombo(container); |
|
73 | 77 |
} |
74 | 78 |
|
75 | 79 |
/* |
... | ... | |
134 | 138 |
} |
135 | 139 |
|
136 | 140 |
|
137 |
if(classifications == null){ |
|
141 |
// fillClassifications(); |
|
142 |
if (pattern == null || pattern.equals("?")){ |
|
143 |
model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(), null, null); |
|
144 |
}else{ |
|
145 |
model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(), limitOfInitialElements, pattern); |
|
146 |
} |
|
147 |
try { |
|
148 |
fillContentProvider(null); |
|
149 |
} catch (CoreException e) { |
|
150 |
// TODO Auto-generated catch block |
|
151 |
e.printStackTrace(); |
|
152 |
} |
|
153 |
} |
|
154 |
|
|
155 |
private void fillClassifications() { |
|
156 |
if(classifications == null){ |
|
138 | 157 |
classifications = CdmStore.getService(IClassificationService.class).list(null, null, null, null, null); |
139 | 158 |
Collections.sort(classifications, new Comparator<Classification>() { |
140 | 159 |
|
... | ... | |
156 | 175 |
selectedClassification = this.cdmBaseToBeFiltered.getClassification(); |
157 | 176 |
} |
158 | 177 |
} |
159 |
if (pattern == null || pattern.equals("?")){ |
|
160 |
model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(), limitOfInitialElements, pattern); |
|
161 |
}else{ |
|
162 |
model = CdmStore.getService(IClassificationService.class).getTaxonNodeUuidAndTitleCacheOfAcceptedTaxaByClassification(selectedClassification.getUuid(), null, null); |
|
163 |
} |
|
164 |
} |
|
178 |
} |
|
165 | 179 |
|
166 | 180 |
/** {@inheritDoc} */ |
167 | 181 |
@Override |
... | ... | |
171 | 185 |
|
172 | 186 |
/** {@inheritDoc} */ |
173 | 187 |
@Override |
174 |
protected String getNewWizardLinkText() {
|
|
188 |
protected String[] getNewWizardText() {
|
|
175 | 189 |
return null; |
176 | 190 |
} |
177 | 191 |
|
... | ... | |
181 | 195 |
selectedClassification = classifications.get(classificationSelectionCombo.getSelectionIndex()); |
182 | 196 |
|
183 | 197 |
// refresh(); |
184 |
setPattern(null); |
|
198 |
if (getSearchField().getText() != null){ |
|
199 |
search(); |
|
200 |
} |
|
185 | 201 |
} |
186 | 202 |
|
187 | 203 |
/** {@inheritDoc} */ |
Also available in: Unified diff
e4 migration of selection dialogs