Browse Source

alphafine遗留问题

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

11
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)) {
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")));
if (result.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(result);
}
lessModelList.addAll(result);
} else {
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));
@ -97,4 +92,4 @@ public class ActionSearchManager implements AlphaFineSearchProcessor {
public SearchResult getMoreSearchResult() {
return moreModelList;
}
}
}

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

@ -76,13 +76,9 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor {
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")));
if (searchResult.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(searchResult);
}
lessModelList.addAll(searchResult);
} else {
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));
@ -114,4 +110,4 @@ public class DocumentSearchManager implements AlphaFineSearchProcessor {
return moreModelList;
}
}
}

10
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")));
if (result.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(result);
}
lessModelList.addAll(result);
} else {
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));
@ -248,4 +244,4 @@ public class FileSearchManager implements AlphaFineSearchProcessor {
public void setContainFrm(boolean containFrm) {
isContainFrm = containFrm;
}
}
}

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

@ -109,13 +109,9 @@ public class PluginSearchManager implements AlphaFineSearchProcessor {
searchResult.add(cellModel);
}
}
if (searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer-Plugin_Addon")));
if (searchResult.size() == 0) {
lessModelList.add(AlphaFineHelper.NO_RESULT_MODEL);
} else {
lessModelList.addAll(searchResult);
}
if (searchResult.size() > 0 && searchResult.size() < AlphaFineConstants.SHOW_SIZE + 1) {
lessModelList.add(0, new MoreModel(Inter.getLocText("FR-Designer_Templates")));
lessModelList.addAll(searchResult);
} else {
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));
@ -142,4 +138,4 @@ public class PluginSearchManager implements AlphaFineSearchProcessor {
public SearchResult getMoreSearchResult() {
return this.moreModelList;
}
}
}
Loading…
Cancel
Save