|
|
@ -77,6 +77,18 @@ import javax.swing.Timer; |
|
|
|
public class AlphaFineFrame extends JFrame { |
|
|
|
public class AlphaFineFrame extends JFrame { |
|
|
|
|
|
|
|
|
|
|
|
private static final String ADVANCED_SEARCH_MARK = "k:"; |
|
|
|
private static final String ADVANCED_SEARCH_MARK = "k:"; |
|
|
|
|
|
|
|
private static final String ACTION_MARK_SHORT = "k:1 "; |
|
|
|
|
|
|
|
private static final String ACTION_MARK = "k:setting "; |
|
|
|
|
|
|
|
private static final String DOCUMENT_MARK_SHORT = "k:2 "; |
|
|
|
|
|
|
|
private static final String DOCUMENT_MARK = "k:help "; |
|
|
|
|
|
|
|
private static final String FILE_MARK_SHORT = "k:3 "; |
|
|
|
|
|
|
|
private static final String FILE_MARK = "k:reportlets "; |
|
|
|
|
|
|
|
private static final String CPT_MARK = "k:cpt "; |
|
|
|
|
|
|
|
private static final String FRM_MARK = "k:frm "; |
|
|
|
|
|
|
|
private static final String DS_MARK = "k:ds "; |
|
|
|
|
|
|
|
private static final String DS_NAME = "dsname=\""; |
|
|
|
|
|
|
|
private static final String PLUGIN_MARK_SHORT = "k:4 "; |
|
|
|
|
|
|
|
private static final String PLUGIN_MARK = "k:shop "; |
|
|
|
|
|
|
|
|
|
|
|
private static final int TIMER_DELAY = 300; |
|
|
|
private static final int TIMER_DELAY = 300; |
|
|
|
|
|
|
|
|
|
|
@ -663,7 +675,7 @@ public class AlphaFineFrame extends JFrame { |
|
|
|
|
|
|
|
|
|
|
|
private void doSearch(String text) { |
|
|
|
private void doSearch(String text) { |
|
|
|
initSearchLoadingPane(); |
|
|
|
initSearchLoadingPane(); |
|
|
|
SearchTextBean searchTextBean = new SearchTextBean(text, segmentationResult); |
|
|
|
SearchTextBean searchTextBean = generateSearchTextBean(text); |
|
|
|
this.productNewsSearchWorkerManager.doSearch(searchTextBean); |
|
|
|
this.productNewsSearchWorkerManager.doSearch(searchTextBean); |
|
|
|
this.settingSearchWorkerManager.doSearch(searchTextBean); |
|
|
|
this.settingSearchWorkerManager.doSearch(searchTextBean); |
|
|
|
this.fileSearchWorkerManager.doSearch(searchTextBean); |
|
|
|
this.fileSearchWorkerManager.doSearch(searchTextBean); |
|
|
@ -671,6 +683,21 @@ public class AlphaFineFrame extends JFrame { |
|
|
|
this.pluginSearchWorkerManager.doSearch(searchTextBean); |
|
|
|
this.pluginSearchWorkerManager.doSearch(searchTextBean); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private SearchTextBean generateSearchTextBean(String searchText) { |
|
|
|
|
|
|
|
if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK) |
|
|
|
|
|
|
|
|| searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) { |
|
|
|
|
|
|
|
return new SearchTextBean(StringUtils.EMPTY, new String[]{getStoreText(searchText)}); |
|
|
|
|
|
|
|
} else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK) |
|
|
|
|
|
|
|
|| searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK) |
|
|
|
|
|
|
|
|| searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) { |
|
|
|
|
|
|
|
return new SearchTextBean(getStoreText(searchText), new String[]{getStoreText(searchText)}); |
|
|
|
|
|
|
|
} else if (searchText.startsWith(DS_MARK)) { |
|
|
|
|
|
|
|
return new SearchTextBean(getStoreText(searchText), new String[]{DS_NAME + getStoreText(searchText)}); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return new SearchTextBean(searchText, segmentationResult); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 仅搜索依赖网络的搜索项 |
|
|
|
* 仅搜索依赖网络的搜索项 |
|
|
|
* |
|
|
|
* |
|
|
|