Browse Source

bug fix ds 数据集搜索

master
XiaXiang 8 years ago
parent
commit
9b2405bf34
  1. 5
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  2. 4
      designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java

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

@ -80,6 +80,7 @@ public class AlphaFineDialog extends UIDialog {
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 ";
@ -296,6 +297,10 @@ public class AlphaFineDialog extends UIDialog {
} else if (searchText.startsWith(CPT_MARK) || searchText.startsWith(FRM_MARK)) {
getFileList(searchText);
return;
} else if (searchText.startsWith(DS_MARK)) {
getFileList(DS_NAME + searchText.substring(searchText.indexOf(" ") + 1, searchText.length()));
return;
} else if (searchText.startsWith(PLUGIN_MARK_SHORT) || searchText.startsWith(PLUGIN_MARK)) {
getPluginList(searchText.substring(searchText.indexOf(" ") + 1, searchText.length()));
return;

4
designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java

@ -10,6 +10,7 @@ import com.fr.design.mainframe.alphafine.cell.model.FileModel;
import com.fr.design.mainframe.alphafine.cell.model.MoreModel;
import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.stable.StableUtils;
@ -25,6 +26,7 @@ import java.util.List;
*/
public class FileSearchManager implements AlphaFineSearchProcessor {
private static final int MARK_LENGTH = 6;
private static final String DS_NAME = "dsname=\"";
private static final MoreModel TITLE_MODEL = new MoreModel(Inter.getLocText("FR-Designer_Templates"), CellType.FILE);
private static FileSearchManager fileSearchManager = null;
private SearchResult filterModelList;
@ -68,7 +70,7 @@ public class FileSearchManager implements AlphaFineSearchProcessor {
isContainFrm = false;
searchText = searchText.substring(MARK_LENGTH, searchText.length());
}
if (StringUtils.isBlank(searchText)) {
if (StringUtils.isBlank(searchText) || ComparatorUtils.equals(searchText, DS_NAME)) {
lessModelList.add(TITLE_MODEL);
return lessModelList;
}

Loading…
Cancel
Save