Revision 707b6237
Added by Niels Hoffmann over 12 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorSearch.java | ||
---|---|---|
24 | 24 |
import org.eclipse.swt.widgets.Button; |
25 | 25 |
import org.eclipse.swt.widgets.Composite; |
26 | 26 |
import org.eclipse.swt.widgets.Label; |
27 |
import org.eclipse.swt.widgets.Menu; |
|
28 | 27 |
import org.eclipse.swt.widgets.Text; |
29 |
import org.eclipse.swt.widgets.ToolItem; |
|
30 | 28 |
import org.eclipse.ui.PlatformUI; |
31 | 29 |
import org.eclipse.ui.swt.IFocusService; |
32 | 30 |
|
33 | 31 |
import eu.etaxonomy.cdm.common.CdmUtils; |
34 |
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput; |
|
35 | 32 |
import eu.etaxonomy.taxeditor.preference.Resources; |
33 |
import eu.etaxonomy.taxeditor.store.SearchManager; |
|
36 | 34 |
|
37 | 35 |
/** |
38 | 36 |
* <p>BulkEditorSearchComposite class.</p> |
... | ... | |
49 | 47 |
* |
50 | 48 |
*/ |
51 | 49 |
private static final String SEARCH = "Search"; |
52 |
|
|
53 |
private static final String DEFAULT_TEXT = "Use \"*\" for wildcard searching"; |
|
54 | 50 |
|
55 |
private BulkEditor editor; |
|
56 |
private Menu sortMenu; |
|
51 |
private static final String DEFAULT_TEXT = String.format("Use \'%s\' for wildcard searching", SearchManager.WILDCARD); |
|
52 |
|
|
53 |
private final BulkEditor editor; |
|
57 | 54 |
|
58 | 55 |
private Text text; |
59 | 56 |
private BulkEditorSortCombo sortCombo; |
... | ... | |
62 | 59 |
|
63 | 60 |
|
64 | 61 |
public Object ORDER_BY = new Object(); |
65 |
private ToolItem toolItem; |
|
66 | 62 |
|
67 | 63 |
/** |
68 | 64 |
* <p>Constructor for BulkEditorSearchComposite.</p> |
... | ... | |
181 | 177 |
private void updateEditorInput() { |
182 | 178 |
|
183 | 179 |
String searchString = getSearchString().trim(); |
184 |
|
|
180 |
|
|
185 | 181 |
if(DEFAULT_TEXT.equals(searchString) || CdmUtils.isEmpty(searchString)){ |
186 | 182 |
return; |
187 |
} |
|
183 |
}
|
|
188 | 184 |
|
189 |
// update query in IEditorInput |
|
190 |
AbstractBulkEditorInput input = editor.getEditorInput(); |
|
191 |
if (input instanceof AbstractBulkEditorInput) { |
|
192 |
BulkEditorQuery query = new BulkEditorQuery(getSearchString(), getComparator()); |
|
193 |
editor.performSearch(query); |
|
194 |
} |
|
185 |
BulkEditorQuery query = new BulkEditorQuery(getSearchString(), getComparator()); |
|
186 |
editor.performSearch(query); |
|
195 | 187 |
} |
196 | 188 |
|
197 | 189 |
/* |
Also available in: Unified diff
Merged with trunk