Revision f2a0567f
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/InstitutionSelectionDialog.java | ||
---|---|---|
11 | 11 |
|
12 | 12 |
import java.util.UUID; |
13 | 13 |
|
14 |
import org.eclipse.core.runtime.CoreException; |
|
15 |
import org.eclipse.swt.widgets.Control; |
|
14 | 16 |
import org.eclipse.swt.widgets.Shell; |
17 |
import org.eclipse.swt.widgets.Text; |
|
15 | 18 |
|
16 | 19 |
import eu.etaxonomy.cdm.api.service.IAgentService; |
17 | 20 |
import eu.etaxonomy.cdm.model.agent.AgentBase; |
... | ... | |
68 | 71 |
*/ |
69 | 72 |
@Override |
70 | 73 |
protected void search() { |
71 |
model = CdmStore.getService(IAgentService.class).getInstitutionUuidAndTitleCache(); |
|
74 |
|
|
75 |
Control control =getSearchField(); |
|
76 |
String pattern = null; |
|
77 |
if (control != null){ |
|
78 |
pattern = ((Text)control).getText(); |
|
79 |
} |
|
80 |
|
|
81 |
if (pattern == null || pattern.equals("?")){ |
|
82 |
model = CdmStore.getService(IAgentService.class).getUuidAndTitleCache(Institution.class, null, null); |
|
83 |
}else{ |
|
84 |
model = CdmStore.getService(IAgentService.class).getUuidAndTitleCache(Institution.class, limitOfInitialElements,pattern); |
|
85 |
} |
|
86 |
try { |
|
87 |
fillContentProvider(null); |
|
88 |
} catch (CoreException e) { |
|
89 |
// TODO Auto-generated catch block |
|
90 |
e.printStackTrace(); |
|
91 |
} |
|
72 | 92 |
} |
73 | 93 |
|
74 | 94 |
/* (non-Javadoc) |
Also available in: Unified diff
institution selection can be filtered now, too