Browse Source

REPORT-75998 修改格式

feature/x
Destiny.Lin 2 years ago
parent
commit
b4a29f1a5f
  1. 6
      designer-realize/src/main/java/com/fr/design/actions/replace/action/ShowSearchResultAction.java
  2. 7
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/condition/SearchConditionManager.java
  3. 9
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/javascript/SearchJSFormulaManager.java
  4. 16
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java

6
designer-realize/src/main/java/com/fr/design/actions/replace/action/ShowSearchResultAction.java

@ -74,7 +74,7 @@ public enum ShowSearchResultAction implements ShowValue {
} else { } else {
Map<String, String> stringHashMap = info.getValue(); Map<String, String> stringHashMap = info.getValue();
String content = stringHashMap.getOrDefault(objectContentKey, StringUtils.EMPTY); String content = stringHashMap.getOrDefault(objectContentKey, StringUtils.EMPTY);
if (content.contains(str) && !StringUtils.isEmpty(content)) { if (content.contains(str) && StringUtils.isNotEmpty(content)) {
info.getContent().setShowStr(ShowValueUtils.getCommonString(content, str)); info.getContent().setShowStr(ShowValueUtils.getCommonString(content, str));
info.getContent().setOldShowStr(content); info.getContent().setOldShowStr(content);
info.getContent().setOperatorArray(ShowValueUtils.getStringStartAndEndIndex(content, str)); info.getContent().setOperatorArray(ShowValueUtils.getStringStartAndEndIndex(content, str));
@ -147,7 +147,7 @@ public enum ShowSearchResultAction implements ShowValue {
jsInfos.add(nameJSInfo); jsInfos.add(nameJSInfo);
} }
} }
if (map.containsKey(objectContentKey) && !StringUtils.isEmpty(map.get(objectContentKey))) { if (map.containsKey(objectContentKey) && StringUtils.isNotEmpty(map.get(objectContentKey))) {
String content = map.get(objectContentKey); String content = map.get(objectContentKey);
if (content.contains(str)) { if (content.contains(str)) {
JSInfo contentJSInfo = info.copy(); JSInfo contentJSInfo = info.copy();
@ -191,7 +191,7 @@ public enum ShowSearchResultAction implements ShowValue {
} }
private void searchMap4SQLContent(Map<String, String> map, List<SQLInfo> sqlInfos, SQLInfo info, String str) { private void searchMap4SQLContent(Map<String, String> map, List<SQLInfo> sqlInfos, SQLInfo info, String str) {
if (map.containsKey(objectContentKey) && !StringUtils.isEmpty(map.get(objectContentKey))) { if (map.containsKey(objectContentKey) && StringUtils.isNotEmpty(map.get(objectContentKey))) {
String content = map.get(objectContentKey); String content = map.get(objectContentKey);
if (content.contains(str)) { if (content.contains(str)) {
SQLInfo contentJSInfo = info.copy(); SQLInfo contentJSInfo = info.copy();

7
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/condition/SearchConditionManager.java

@ -8,6 +8,8 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* 管理条件类型的注册
*
* @author Destiny.Lin * @author Destiny.Lin
* @version 11.0 * @version 11.0
* created by Destiny.Lin on 2022-09-16 * created by Destiny.Lin on 2022-09-16
@ -28,7 +30,7 @@ public class SearchConditionManager implements SearchManager {
@Override @Override
public void registerAction(String tag, SearchAction searchAction) { public void registerAction(String tag, SearchAction searchAction) {
if (searchAction instanceof SearchConditionFormula){ if (searchAction instanceof SearchConditionFormula) {
register(tag, (SearchConditionFormula) searchAction); register(tag, (SearchConditionFormula) searchAction);
} }
} }
@ -60,9 +62,10 @@ public class SearchConditionManager implements SearchManager {
/** /**
* 获取类型 * 获取类型
*
* @return * @return
*/ */
public Map<String, SearchConditionFormula> getConditionType(){ public Map<String, SearchConditionFormula> getConditionType() {
return conditionType; return conditionType;
} }

9
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/javascript/SearchJSFormulaManager.java

@ -8,6 +8,8 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* 管理JS公式的注册
*
* @author Destiny.Lin * @author Destiny.Lin
* @version 11.0 * @version 11.0
* created by Destiny.Lin on 2022-09-16 * created by Destiny.Lin on 2022-09-16
@ -18,6 +20,7 @@ public class SearchJSFormulaManager implements SearchManager {
public static final String COMMIT_2_DB_JAVASCRIPT = "Commit2DBJavaScript"; public static final String COMMIT_2_DB_JAVASCRIPT = "Commit2DBJavaScript";
public static final String EXPORT_JAVASCRIPT = "ExportJavaScript"; public static final String EXPORT_JAVASCRIPT = "ExportJavaScript";
public static final String MOBILE_POPUP_HYPERLINK = "MobilePopupHyperlink"; public static final String MOBILE_POPUP_HYPERLINK = "MobilePopupHyperlink";
private SearchJSFormulaManager() { private SearchJSFormulaManager() {
//控件事件里面需要特殊处理的类型 //控件事件里面需要特殊处理的类型
//EmailJavaScript(这个暂时不做处理) //EmailJavaScript(这个暂时不做处理)
@ -41,7 +44,7 @@ public class SearchJSFormulaManager implements SearchManager {
@Override @Override
public void registerAction(String tag, SearchAction searchAction) { public void registerAction(String tag, SearchAction searchAction) {
if (searchAction instanceof SearchJSFormula){ if (searchAction instanceof SearchJSFormula) {
register(tag, (SearchJSFormula) searchAction); register(tag, (SearchJSFormula) searchAction);
} }
} }
@ -50,6 +53,7 @@ public class SearchJSFormulaManager implements SearchManager {
public void removeAction(String tag) { public void removeAction(String tag) {
remove(tag); remove(tag);
} }
/** /**
* 注册 * 注册
* *
@ -71,9 +75,10 @@ public class SearchJSFormulaManager implements SearchManager {
/** /**
* 获取类型 * 获取类型
*
* @return * @return
*/ */
public Map<String, SearchJSFormula> getJSType(){ public Map<String, SearchJSFormula> getJSType() {
return javaScriptType; return javaScriptType;
} }

16
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java

@ -49,7 +49,7 @@ public class ITReplaceNorthPanel {
private int matchX, matchY, matchWidth, matchHeight; private int matchX, matchY, matchWidth, matchHeight;
private int resultLabelX, resultLabelY, resultLabelWidth, resultLabelHeight; private int resultLabelX, resultLabelY, resultLabelWidth, resultLabelHeight;
private int findInputComboBoxX, findInputComboBoxY, findInputComboBoxWidth, findInputComboBoxHeight; private int findInputComboBoxX, findInputComboBoxY, findInputComboBoxWidth, findInputComboBoxHeight;
private int REPLACE_INPUT_COMBOBOX_X, REPLACE_INPUT_COMBOBOX_Y, REPLACE_INPUT_COMBOBOX_WIDTH, REPLACE_INPUT_COMBOBOX_HEIGHT; private int replaceInputComboBoxX, replaceInputComboBoxY, replaceInputComboBoxWidth, replaceInputComboBoxHeight;
private int replaceButtonX, replaceButtonY, replaceButtonWidth, replaceButtonHeight; private int replaceButtonX, replaceButtonY, replaceButtonWidth, replaceButtonHeight;
private int searchButtonX, searchButtonY, searchButtonWidth, searchButtonHeight; private int searchButtonX, searchButtonY, searchButtonWidth, searchButtonHeight;
private int buttonGap; private int buttonGap;
@ -196,7 +196,7 @@ public class ITReplaceNorthPanel {
searchButtonHeight = 25; searchButtonHeight = 25;
searchButtonY = resultLabelY; searchButtonY = resultLabelY;
searchButtonX = REPLACE_INPUT_COMBOBOX_X + REPLACE_INPUT_COMBOBOX_WIDTH - replaceButtonWidth * 2 - buttonGap; searchButtonX = replaceInputComboBoxX + replaceInputComboBoxWidth - replaceButtonWidth * 2 - buttonGap;
searchButton.setBounds(searchButtonX, searchButtonY, searchButtonWidth, searchButtonHeight); searchButton.setBounds(searchButtonX, searchButtonY, searchButtonWidth, searchButtonHeight);
} }
@ -205,16 +205,16 @@ public class ITReplaceNorthPanel {
replaceButtonWidth = templateWidth / 30; replaceButtonWidth = templateWidth / 30;
replaceButtonHeight = 25; replaceButtonHeight = 25;
replaceButtonY = resultLabelY; replaceButtonY = resultLabelY;
replaceButtonX = REPLACE_INPUT_COMBOBOX_X + REPLACE_INPUT_COMBOBOX_WIDTH - replaceButtonWidth; replaceButtonX = replaceInputComboBoxX + replaceInputComboBoxWidth - replaceButtonWidth;
replaceButton.setBounds(replaceButtonX, replaceButtonY, replaceButtonWidth, replaceButtonHeight); replaceButton.setBounds(replaceButtonX, replaceButtonY, replaceButtonWidth, replaceButtonHeight);
} }
private void setReplaceInputComboboxBounds(int x, int y, int templateWidth) { private void setReplaceInputComboboxBounds(int x, int y, int templateWidth) {
REPLACE_INPUT_COMBOBOX_X = x + templateWidth / 2 + templateWidth / 30; replaceInputComboBoxX = x + templateWidth / 2 + templateWidth / 30;
REPLACE_INPUT_COMBOBOX_Y = y + 55; replaceInputComboBoxY = y + 55;
REPLACE_INPUT_COMBOBOX_WIDTH = templateWidth / 3 + templateWidth / 30 * 2; replaceInputComboBoxWidth = templateWidth / 3 + templateWidth / 30 * 2;
REPLACE_INPUT_COMBOBOX_HEIGHT = 25; replaceInputComboBoxHeight = 25;
replaceInputCombobox.setBounds(REPLACE_INPUT_COMBOBOX_X, REPLACE_INPUT_COMBOBOX_Y, REPLACE_INPUT_COMBOBOX_WIDTH, REPLACE_INPUT_COMBOBOX_HEIGHT); replaceInputCombobox.setBounds(replaceInputComboBoxX, replaceInputComboBoxY, replaceInputComboBoxWidth, replaceInputComboBoxHeight);
} }
private void setFindInputComboboxBounds(int x, int y, int templateWidth) { private void setFindInputComboboxBounds(int x, int y, int templateWidth) {

Loading…
Cancel
Save