Revision b0358e33
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/AbstractFilteredCdmResourceSelectionDialog.java | ||
---|---|---|
23 | 23 |
import org.eclipse.core.runtime.IProgressMonitor; |
24 | 24 |
import org.eclipse.core.runtime.IStatus; |
25 | 25 |
import org.eclipse.jface.dialogs.IDialogSettings; |
26 |
import org.eclipse.jface.viewers.CellEditor.LayoutData; |
|
27 | 26 |
import org.eclipse.jface.viewers.ILabelProvider; |
28 | 27 |
import org.eclipse.jface.viewers.LabelProvider; |
29 | 28 |
import org.eclipse.jface.viewers.StructuredSelection; |
... | ... | |
39 | 38 |
import org.eclipse.swt.widgets.Button; |
40 | 39 |
import org.eclipse.swt.widgets.Composite; |
41 | 40 |
import org.eclipse.swt.widgets.Control; |
42 |
import org.eclipse.swt.widgets.Label; |
|
43 | 41 |
import org.eclipse.swt.widgets.Shell; |
44 | 42 |
import org.eclipse.swt.widgets.Text; |
45 | 43 |
|
... | ... | |
423 | 421 |
@Override |
424 | 422 |
protected void createButtonsForButtonBar(Composite parent) { |
425 | 423 |
String[] newButtonText = getNewWizardText(); |
426 |
|
|
424 |
|
|
427 | 425 |
if (newButtonText!= null){ |
428 | 426 |
this.newButton1 = createButton(parent, this.new_id, newButtonText[0], false); |
429 | 427 |
newButton1.addSelectionListener(getNewWizardButtonSelectionListener()); |
430 |
|
|
431 |
|
|
428 |
|
|
429 |
|
|
432 | 430 |
if (newButtonText.length > 1){ |
433 | 431 |
newButton2 = createButton(parent, this.new_id2, newButtonText[1], false); |
434 | 432 |
newButton2.addSelectionListener(getNewWizardButtonSelectionListener()); |
435 | 433 |
|
436 | 434 |
} |
437 |
|
|
435 |
|
|
438 | 436 |
} |
439 | 437 |
Button space = createButton(parent, this.space_id, " ", false); |
440 | 438 |
space.setEnabled(false); |
... | ... | |
451 | 449 |
gridLayout.numColumns=2; |
452 | 450 |
} |
453 | 451 |
parent.setLayout(gridLayout); |
454 |
|
|
452 |
|
|
455 | 453 |
super.createButtonsForButtonBar(parent); |
456 | 454 |
} |
457 | 455 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NomenclaturalReferenceSelectionDialog.java | ||
---|---|---|
4 | 4 |
import java.util.Comparator; |
5 | 5 |
import java.util.List; |
6 | 6 |
|
7 |
import org.apache.commons.lang.StringUtils; |
|
7 | 8 |
import org.eclipse.jface.viewers.ILabelProvider; |
8 | 9 |
import org.eclipse.jface.viewers.LabelProvider; |
9 | 10 |
import org.eclipse.swt.SWT; |
... | ... | |
54 | 55 |
pattern = author.getNomenclaturalTitle(); |
55 | 56 |
if (control!= null){ |
56 | 57 |
firstCall = false; |
57 |
((Text)control).setText(pattern); |
|
58 |
model = CdmStore.getService(IReferenceService.class).getUuidAndAbbrevTitleCacheForAuthor(limitOfInitialElements, pattern, null); |
|
59 |
|
|
58 | 60 |
} |
59 | 61 |
|
60 |
} |
|
62 |
}else{
|
|
61 | 63 |
|
62 | 64 |
if (isUseIdentifier()){ |
63 | 65 |
List<IdentifiedEntityDTO<Reference>> list = CdmStore.getService(IReferenceService.class).listByIdentifierAbbrev(pattern, null, MatchMode.EXACT, limitOfInitialElements); |
... | ... | |
72 | 74 |
model = CdmStore.getService(IReferenceService.class).getUuidAndAbbrevTitleCache(limitOfInitialElements, pattern); |
73 | 75 |
} |
74 | 76 |
|
75 |
|
|
77 |
} |
|
76 | 78 |
|
77 | 79 |
|
78 | 80 |
|
... | ... | |
233 | 235 |
|
234 | 236 |
} |
235 | 237 |
|
238 |
@Override |
|
239 |
protected void search() { |
|
240 |
Control control =getSearchField(); |
|
241 |
String pattern = null; |
|
242 |
if (control != null){ |
|
243 |
pattern = ((Text)control).getText(); |
|
244 |
if (pattern.equals("*") || pattern.equals("?")){ |
|
245 |
callService(null); |
|
246 |
}else if (StringUtils.isNotBlank(pattern)){ |
|
247 |
callService(pattern); |
|
248 |
} else if (firstCall){ |
|
249 |
callService(null); |
|
250 |
} |
|
251 |
fillContentProvider(null); |
|
252 |
} |
|
253 |
} |
|
254 |
|
|
236 | 255 |
|
237 | 256 |
|
238 | 257 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/PrimerSelectionDialog.java | ||
---|---|---|
62 | 62 |
/** {@inheritDoc} */ |
63 | 63 |
@Override |
64 | 64 |
protected void callService(String pattern) { |
65 |
model = CdmStore.getService(IPrimerService.class).getUuidAndTitleCache(limitOfInitialElements, pattern); |
|
65 |
model = CdmStore.getService(IPrimerService.class).getPrimerUuidAndTitleCache(limitOfInitialElements, pattern);
|
|
66 | 66 |
} |
67 | 67 |
|
68 | 68 |
/* (non-Javadoc) |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/WorkingSetSelectionDialog.java | ||
---|---|---|
64 | 64 |
/** {@inheritDoc} */ |
65 | 65 |
@Override |
66 | 66 |
protected void callService(String pattern) { |
67 |
model = CdmStore.getService(IWorkingSetService.class).getUuidAndTitleCache(limitOfInitialElements, pattern); |
|
67 |
model = CdmStore.getService(IWorkingSetService.class).getWorkingSetUuidAndTitleCache(limitOfInitialElements, pattern);
|
|
68 | 68 |
} |
69 | 69 |
|
70 | 70 |
@Override |
Also available in: Unified diff
adapt workingSetSelectionDialog to new getUuidAndTitleCache method and nomencl ref search with dedicated author