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. 9
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/highlight/condition/SearchConditionManager.java
  3. 11
      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 {
Map<String, String> stringHashMap = info.getValue();
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().setOldShowStr(content);
info.getContent().setOperatorArray(ShowValueUtils.getStringStartAndEndIndex(content, str));
@ -147,7 +147,7 @@ public enum ShowSearchResultAction implements ShowValue {
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);
if (content.contains(str)) {
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) {
if (map.containsKey(objectContentKey) && !StringUtils.isEmpty(map.get(objectContentKey))) {
if (map.containsKey(objectContentKey) && StringUtils.isNotEmpty(map.get(objectContentKey))) {
String content = map.get(objectContentKey);
if (content.contains(str)) {
SQLInfo contentJSInfo = info.copy();

9
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;
/**
* 管理条件类型的注册
*
* @author Destiny.Lin
* @version 11.0
* created by Destiny.Lin on 2022-09-16
@ -28,7 +30,7 @@ public class SearchConditionManager implements SearchManager {
@Override
public void registerAction(String tag, SearchAction searchAction) {
if (searchAction instanceof SearchConditionFormula){
if (searchAction instanceof SearchConditionFormula) {
register(tag, (SearchConditionFormula) searchAction);
}
}
@ -42,7 +44,7 @@ public class SearchConditionManager implements SearchManager {
/**
* 注册
*
* @param tag 用于匹配的类型tag
* @param tag 用于匹配的类型tag
* @param searchConditionFormula 对应的实现类
*/
private void register(String tag, SearchConditionFormula searchConditionFormula) {
@ -60,9 +62,10 @@ public class SearchConditionManager implements SearchManager {
/**
* 获取类型
*
* @return
*/
public Map<String, SearchConditionFormula> getConditionType(){
public Map<String, SearchConditionFormula> getConditionType() {
return conditionType;
}

11
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;
/**
* 管理JS公式的注册
*
* @author Destiny.Lin
* @version 11.0
* 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 EXPORT_JAVASCRIPT = "ExportJavaScript";
public static final String MOBILE_POPUP_HYPERLINK = "MobilePopupHyperlink";
private SearchJSFormulaManager() {
//控件事件里面需要特殊处理的类型
//EmailJavaScript(这个暂时不做处理)
@ -41,7 +44,7 @@ public class SearchJSFormulaManager implements SearchManager {
@Override
public void registerAction(String tag, SearchAction searchAction) {
if (searchAction instanceof SearchJSFormula){
if (searchAction instanceof SearchJSFormula) {
register(tag, (SearchJSFormula) searchAction);
}
}
@ -50,10 +53,11 @@ public class SearchJSFormulaManager implements SearchManager {
public void removeAction(String tag) {
remove(tag);
}
/**
* 注册
*
* @param tag 用于匹配的类型tag
* @param tag 用于匹配的类型tag
* @param searchJSFormula 对应的实现类
*/
private void register(String tag, SearchJSFormula searchJSFormula) {
@ -71,9 +75,10 @@ public class SearchJSFormulaManager implements SearchManager {
/**
* 获取类型
*
* @return
*/
public Map<String, SearchJSFormula> getJSType(){
public Map<String, SearchJSFormula> getJSType() {
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 resultLabelX, resultLabelY, resultLabelWidth, resultLabelHeight;
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 searchButtonX, searchButtonY, searchButtonWidth, searchButtonHeight;
private int buttonGap;
@ -196,7 +196,7 @@ public class ITReplaceNorthPanel {
searchButtonHeight = 25;
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);
}
@ -205,16 +205,16 @@ public class ITReplaceNorthPanel {
replaceButtonWidth = templateWidth / 30;
replaceButtonHeight = 25;
replaceButtonY = resultLabelY;
replaceButtonX = REPLACE_INPUT_COMBOBOX_X + REPLACE_INPUT_COMBOBOX_WIDTH - replaceButtonWidth;
replaceButtonX = replaceInputComboBoxX + replaceInputComboBoxWidth - replaceButtonWidth;
replaceButton.setBounds(replaceButtonX, replaceButtonY, replaceButtonWidth, replaceButtonHeight);
}
private void setReplaceInputComboboxBounds(int x, int y, int templateWidth) {
REPLACE_INPUT_COMBOBOX_X = x + templateWidth / 2 + templateWidth / 30;
REPLACE_INPUT_COMBOBOX_Y = y + 55;
REPLACE_INPUT_COMBOBOX_WIDTH = templateWidth / 3 + templateWidth / 30 * 2;
REPLACE_INPUT_COMBOBOX_HEIGHT = 25;
replaceInputCombobox.setBounds(REPLACE_INPUT_COMBOBOX_X, REPLACE_INPUT_COMBOBOX_Y, REPLACE_INPUT_COMBOBOX_WIDTH, REPLACE_INPUT_COMBOBOX_HEIGHT);
replaceInputComboBoxX = x + templateWidth / 2 + templateWidth / 30;
replaceInputComboBoxY = y + 55;
replaceInputComboBoxWidth = templateWidth / 3 + templateWidth / 30 * 2;
replaceInputComboBoxHeight = 25;
replaceInputCombobox.setBounds(replaceInputComboBoxX, replaceInputComboBoxY, replaceInputComboBoxWidth, replaceInputComboBoxHeight);
}
private void setFindInputComboboxBounds(int x, int y, int templateWidth) {

Loading…
Cancel
Save