Browse Source

代码质量

master
XiaXiang 7 years ago
parent
commit
74bd091551
  1. 39
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

39
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -391,30 +391,41 @@ public class AlphaFineDialog extends UIDialog {
private void rebuildList(String searchText) { private void rebuildList(String searchText) {
resetContainer(); resetContainer();
if (searchText.startsWith(ADVANCED_SEARCH_MARK)) { if (searchText.startsWith(ADVANCED_SEARCH_MARK)) {
dealWithSearchText(searchText);
} else {
storeText = searchText.trim();
doNormalSearch(storeText);
}
}
/**
* 处理搜索字符串
* @param searchText
*/
private void dealWithSearchText(String searchText) {
if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK)) { if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); buildActionList(getStoreText(searchText));
buildActionList(storeText);
} else if (searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) { } else if (searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); buildDocumentList(getStoreText(searchText));
buildDocumentList(storeText);
} else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK)) { } else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); buildFileList(getStoreText(searchText));
buildFileList(storeText);
} else if (searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK)) { } else if (searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildFileList(searchText); buildFileList(searchText);
} else if (searchText.startsWith(DS_MARK)) { } else if (searchText.startsWith(DS_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); buildFileList(DS_NAME + getStoreText(searchText));
buildFileList(DS_NAME + storeText);
} else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) { } else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length()); buildPluginList(getStoreText(searchText));
buildPluginList(storeText);
} }
} else {
storeText = searchText.trim();
doNormalSearch(storeText);
} }
/**
* 截取字符串中关键词
* @param searchText
* @return
*/
private String getStoreText(String searchText) {
return searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
} }
/** /**

Loading…
Cancel
Save