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) {
resetContainer();
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)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildActionList(storeText);
buildActionList(getStoreText(searchText));
} else if (searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildDocumentList(storeText);
buildDocumentList(getStoreText(searchText));
} else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildFileList(storeText);
buildFileList(getStoreText(searchText));
} else if (searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildFileList(searchText);
} else if (searchText.startsWith(DS_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildFileList(DS_NAME + storeText);
buildFileList(DS_NAME + getStoreText(searchText));
} else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildPluginList(storeText);
buildPluginList(getStoreText(searchText));
}
} 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