Browse Source

alphafine遗留问题

master
XiaXiang 7 years ago
parent
commit
369bd13951
  1. 9
      designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java
  2. 8
      designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java
  3. 8
      designer/src/com/fr/design/mainframe/alphafine/search/manager/FileSearchManager.java
  4. 10
      designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java

9
designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java

@ -74,15 +74,10 @@ public class ActionSearchManager implements AlphaFineSearchProcessor {
if (!AlphaFineHelper.getFilterResult().contains(object)) { if (!AlphaFineHelper.getFilterResult().contains(object)) {
result.add(object); result.add(object);
} }
} }
if (result.size() < AlphaFineConstants.SHOW_SIZE + 1) { if (result.size() > 0 && result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set"))); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set")));
if (result.size() == 0) { lessModelList.addAll(result);
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(result);
}
} else { } else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.ACTION)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Set"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.ACTION));
lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE)); lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE));

8
designer/src/com/fr/design/mainframe/alphafine/search/manager/DocumentSearchManager.java

@ -76,13 +76,9 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor {
searchResult.add(cellModel); searchResult.add(cellModel);
} }
} }
if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { if (searchResult.size() > 0 && searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"))); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP")));
if (searchResult.size() == 0) { lessModelList.addAll(searchResult);
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(searchResult);
}
} else { } else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.DOCUMENT)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_COMMUNITY_HELP"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.DOCUMENT));
lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE)); lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE));

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

@ -100,13 +100,9 @@ public class FileSearchManager implements AlphaFineSearchProcessor {
} }
} }
if (result.size() < AlphaFineConstants.SHOW_SIZE + 1) { if (result.size() > 0 && result.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates"))); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates")));
if (result.size() == 0) { lessModelList.addAll(result);
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(result);
}
} else { } else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.FILE)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.FILE));
lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE)); lessModelList.addAll(result.subList(0, AlphaFineConstants.SHOW_SIZE));

10
designer/src/com/fr/design/mainframe/alphafine/search/manager/PluginSearchManager.java

@ -109,13 +109,9 @@ public class PluginSearchManager implements AlphaFineSearchProcessor {
searchResult.add(cellModel); searchResult.add(cellModel);
} }
} }
if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) { if (searchResult.size() > 0 && searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"))); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates")));
if (searchResult.size() == 0) { lessModelList.addAll(searchResult);
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(searchResult);
}
} else { } else {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.PLUGIN)); lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon"), Inter.getLocText("FR-Designer_AlphaFine_ShowAll"), true, CellType.PLUGIN));
lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE)); lessModelList.addAll(searchResult.subList(0, AlphaFineConstants.SHOW_SIZE));

Loading…
Cancel
Save