Browse Source

代码质量

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

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

@ -391,25 +391,7 @@ 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)) {
if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK)) { dealWithSearchText(searchText);
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildActionList(storeText);
} else if (searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildDocumentList(storeText);
} else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildFileList(storeText);
} 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);
} else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) {
storeText = searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
buildPluginList(storeText);
}
} else { } else {
storeText = searchText.trim(); storeText = searchText.trim();
doNormalSearch(storeText); doNormalSearch(storeText);
@ -417,6 +399,35 @@ public class AlphaFineDialog extends UIDialog {
} }
/**
* 处理搜索字符串
* @param searchText
*/
private void dealWithSearchText(String searchText) {
if (searchText.startsWith(ACTION_MARK_SHORT) || searchText.startsWith(ACTION_MARK)) {
buildActionList(getStoreText(searchText));
} else if (searchText.startsWith(DOCUMENT_MARK_SHORT) || searchText.startsWith(DOCUMENT_MARK)) {
buildDocumentList(getStoreText(searchText));
} else if (searchText.startsWith(FILE_MARK_SHORT) || searchText.startsWith(FILE_MARK)) {
buildFileList(getStoreText(searchText));
} else if (searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK)) {
buildFileList(searchText);
} else if (searchText.startsWith(DS_MARK)) {
buildFileList(DS_NAME + getStoreText(searchText));
} else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) {
buildPluginList(getStoreText(searchText));
}
}
/**
* 截取字符串中关键词
* @param searchText
* @return
*/
private String getStoreText(String searchText) {
return searchText.substring(searchText.indexOf(StringUtils.BLANK) + 1, searchText.length());
}
/** /**
* 重置面板 * 重置面板
*/ */

Loading…
Cancel
Save