|
|
@ -19,7 +19,6 @@ import com.fr.stable.StringUtils; |
|
|
|
* Created by XiaXiang on 2017/3/27. |
|
|
|
* Created by XiaXiang on 2017/3/27. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class DocumentSearchManager implements AlphaFineSearchProcessor { |
|
|
|
public class DocumentSearchManager implements AlphaFineSearchProcessor { |
|
|
|
private static final MoreModel TITLE_MODEL = new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP")); |
|
|
|
|
|
|
|
private static DocumentSearchManager documentSearchManager = null; |
|
|
|
private static DocumentSearchManager documentSearchManager = null; |
|
|
|
private SearchResult lessModelList; |
|
|
|
private SearchResult lessModelList; |
|
|
|
private SearchResult moreModelList; |
|
|
|
private SearchResult moreModelList; |
|
|
@ -51,7 +50,7 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor { |
|
|
|
lessModelList = new SearchResult(); |
|
|
|
lessModelList = new SearchResult(); |
|
|
|
moreModelList = new SearchResult(); |
|
|
|
moreModelList = new SearchResult(); |
|
|
|
if (StringUtils.isBlank(searchText)) { |
|
|
|
if (StringUtils.isBlank(searchText)) { |
|
|
|
lessModelList.add(TITLE_MODEL); |
|
|
|
lessModelList.add(new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"))); |
|
|
|
return lessModelList; |
|
|
|
return lessModelList; |
|
|
|
} |
|
|
|
} |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainDocument()) { |
|
|
|
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isContainDocument()) { |
|
|
@ -78,7 +77,7 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { |
|
|
|
if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { |
|
|
|
lessModelList.add(0, TITLE_MODEL); |
|
|
|
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"))); |
|
|
|
if (searchResult.size() == 0) { |
|
|
|
if (searchResult.size() == 0) { |
|
|
|
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL); |
|
|
|
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -105,7 +104,7 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private SearchResult getNoConnectList() { |
|
|
|
private SearchResult getNoConnectList() { |
|
|
|
SearchResult result = new SearchResult(); |
|
|
|
SearchResult result = new SearchResult(); |
|
|
|
result.add(0, TITLE_MODEL); |
|
|
|
result.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"))); |
|
|
|
result.add(AlphaFineHelper.NO_CONNECTION_MODEL); |
|
|
|
result.add(AlphaFineHelper.NO_CONNECTION_MODEL); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|