Browse Source

REPORT-58577【回归测试】map公式合法性检测错误 && REPORT-58124 公式编辑器优化:不支持实时计算的功能提示处理

1.map的参数类型调整;
2.对内置参数不支持提示。
fix-lag
Hoky 3 years ago
parent
commit
698afca5a6
  1. 24
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

24
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -102,6 +102,7 @@ import java.io.Reader;
import java.io.StringReader; import java.io.StringReader;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.HashMap; import java.util.HashMap;
@ -787,9 +788,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
return scanner.getUnSupportFormula(); return scanner.getUnSupportFormula();
} }
UnsupportedSimulationFormulaHunter unsupportedSimulationFormulaHunter = new UnsupportedSimulationFormulaHunter(); UnsupportedSimulationNodeHunter unsupportedSimulationFormulaHunter = new UnsupportedSimulationNodeHunter();
expression.traversal4Tiny(unsupportedSimulationFormulaHunter); expression.traversal4Tiny(unsupportedSimulationFormulaHunter);
return unsupportedSimulationFormulaHunter.isSupported() ? null : unsupportedSimulationFormulaHunter.getUnSupportFormula(); return unsupportedSimulationFormulaHunter.isSupported() ? null : unsupportedSimulationFormulaHunter.getUnSupportedNode();
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error("", e); FineLoggerFactory.getLogger().error("", e);
} }
@ -869,25 +870,30 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
} }
} }
private static class UnsupportedSimulationFormulaHunter extends TinyHunter { private static class UnsupportedSimulationNodeHunter extends TinyHunter {
private boolean supported = true; private boolean supported = true;
private String unSupportFormula; private String unSupportedNode;
private String[] curReportVariables;
public UnsupportedSimulationNodeHunter() {
curReportVariables = VariableResolver.DEFAULT.resolveCurReportVariables();
}
public boolean isSupported() { public boolean isSupported() {
return supported; return supported;
} }
public String getUnSupportFormula() { public String getUnSupportedNode() {
return unSupportFormula; return unSupportedNode;
} }
public void hunter4Tiny(Tiny tiny) { public void hunter4Tiny(Tiny tiny) {
if (tiny.getClass() == ColumnRowRangeInPage.class) { if (tiny.getClass() == ColumnRowRangeInPage.class || Arrays.asList(curReportVariables).contains(tiny.toString())) {
supported = false; supported = false;
unSupportFormula = tiny.toString(); unSupportedNode = tiny.toString();
} }
} }
} }

Loading…
Cancel
Save