Browse Source

bug fix

master
XiaXiang 8 years ago
parent
commit
ce9ed87d3e
  1. 3
      designer/src/com/fr/design/mainframe/alphafine/search/manager/ActionSearchManager.java
  2. 12
      designer_base/src/com/fr/design/mainframe/toolbar/UpdateActionModel.java

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

@ -11,6 +11,7 @@ import com.fr.design.mainframe.toolbar.UpdateActionManager;
import com.fr.design.mainframe.toolbar.UpdateActionModel;
import com.fr.general.FRLogger;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import java.util.List;
@ -38,7 +39,7 @@ public class ActionSearchManager implements AlphaFineSearchProcessor {
if (DesignerEnvManager.getEnvManager().getAlphafineConfigManager().isContainAction()) {
List<UpdateActionModel> updateActions = UpdateActionManager.getUpdateActionManager().getUpdateActions();
for (UpdateActionModel updateActionModel : updateActions) {
if (updateActionModel.getActionName() != null && updateActionModel.getParentName() != null) {
if (StringUtils.isNotBlank(updateActionModel.getSearchKey())) {
if (updateActionModel.getSearchKey().toLowerCase().contains(searchText.toLowerCase()) ) {
filterModelList.add(new ActionModel(updateActionModel.getActionName(), updateActionModel.getParentName(), updateActionModel.getAction()));
}

12
designer_base/src/com/fr/design/mainframe/toolbar/UpdateActionModel.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe.toolbar;
import com.fr.design.actions.UpdateAction;
import com.fr.stable.StringUtils;
import com.fr.stable.pinyin.PinyinFormat;
import com.fr.stable.pinyin.PinyinHelper;
@ -33,10 +34,13 @@ public class UpdateActionModel {
*/
private void setSearchKey(String parentName, UpdateAction action) {
StringBuffer buffer = new StringBuffer();
buffer.append(parentName).append(PinyinHelper.convertToPinyinString(parentName, SEPARATOR, PinyinFormat.WITHOUT_TONE))
.append(PinyinHelper.getShortPinyin(parentName))
.append(actionName).append(PinyinHelper.convertToPinyinString(actionName, SEPARATOR, PinyinFormat.WITHOUT_TONE))
.append(PinyinHelper.getShortPinyin(actionName)).append(action.getSearchText());
if (actionName == null) {
return;
}
buffer.append(parentName).append(SEPARATOR).append(PinyinHelper.convertToPinyinString(parentName, "", PinyinFormat.WITHOUT_TONE))
.append(SEPARATOR).append(PinyinHelper.getShortPinyin(parentName)).append(SEPARATOR)
.append(actionName).append(SEPARATOR).append(PinyinHelper.convertToPinyinString(actionName, "", PinyinFormat.WITHOUT_TONE))
.append(SEPARATOR).append(PinyinHelper.getShortPinyin(actionName)).append(action.getSearchText());
this.searchKey = buffer.toString();
}

Loading…
Cancel
Save