Revision eea5c6dc
Added by Niels Hoffmann almost 13 years ago
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchBar.java | ||
---|---|---|
52 | 52 |
private Text text_search; |
53 | 53 |
private String srv; |
54 | 54 |
|
55 |
private String defaultText = "Use \"*\" for wildcard searching"; |
|
55 |
private final String defaultText = "Use \"*\" for wildcard searching";
|
|
56 | 56 |
|
57 | 57 |
final private ConfigurationSelectionListener configurationListener = new ConfigurationSelectionListener(); |
58 | 58 |
|
... | ... | |
174 | 174 |
if(searchString == null){ |
175 | 175 |
return; |
176 | 176 |
} |
177 |
|
|
177 | 178 |
if("*".equals(searchString.trim())){ |
178 | 179 |
NavigationUtil.warningDialog("Could not execute search", this, "Please type at least one character when using the \"*\" wildcard."); |
179 | 180 |
return; |
180 | 181 |
} |
181 | 182 |
|
183 |
|
|
182 | 184 |
ITaxonServiceConfigurator configurator = configurationListener.getConfigurator(); |
183 | 185 |
configurator.setSearchString(searchString); |
184 | 186 |
openSearchResultsView(configurator); |
... | ... | |
221 | 223 |
*/ |
222 | 224 |
class DropdownSelectionListener extends SelectionAdapter { |
223 | 225 |
|
224 |
private Menu menu; |
|
226 |
private final Menu menu;
|
|
225 | 227 |
|
226 | 228 |
public DropdownSelectionListener(ToolItem dropdown) { |
227 | 229 |
menu = new Menu(dropdown.getParent().getShell()); |
... | ... | |
235 | 237 |
menuItem.addSelectionListener(configurationListener); |
236 | 238 |
} |
237 | 239 |
|
240 |
@Override |
|
238 | 241 |
public void widgetSelected(SelectionEvent event) { |
239 | 242 |
if (event.detail == SWT.ARROW) { |
240 | 243 |
ToolItem item = (ToolItem) event.widget; |
... | ... | |
266 | 269 |
* org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse |
267 | 270 |
* .swt.events.SelectionEvent) |
268 | 271 |
*/ |
272 |
@Override |
|
269 | 273 |
public void widgetSelected(SelectionEvent e) { |
270 | 274 |
NavigationUtil.info("configuration menu clicked"); |
271 | 275 |
SearchOption option = (SearchOption) e.widget.getData(); |
... | ... | |
311 | 315 |
NAME("Names (without taxa)"), |
312 | 316 |
COMMON_NAME("Common Names"); |
313 | 317 |
|
314 |
private String label; |
|
318 |
private final String label;
|
|
315 | 319 |
|
316 | 320 |
private SearchOption(String label) { |
317 | 321 |
this.label = label; |
Also available in: Unified diff
Temporary fix for #2366; fixes #2368; Refactoring annotations in the name editor