Browse Source

Pull request #5669: REPORT-58124 公式编辑器优化:不支持实时计算的功能提示处理

Merge in DESIGN/design from ~HOKY.HE/design-hoky:release/11.0 to release/11.0

* commit '0c2903ad19ad5ec79af055fb9a95acf1c74005d7':
  REPORT-58577【回归测试】map公式合法性检测错误 && REPORT-58124 公式编辑器优化:不支持实时计算的功能提示处理 1.map的参数类型调整; 2.对内置参数不支持提示。
fix-lag
Hoky.He 3 years ago
parent
commit
493e6e9525
  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.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
@ -787,9 +788,9 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
return scanner.getUnSupportFormula();
}
UnsupportedSimulationFormulaHunter unsupportedSimulationFormulaHunter = new UnsupportedSimulationFormulaHunter();
UnsupportedSimulationNodeHunter unsupportedSimulationFormulaHunter = new UnsupportedSimulationNodeHunter();
expression.traversal4Tiny(unsupportedSimulationFormulaHunter);
return unsupportedSimulationFormulaHunter.isSupported() ? null : unsupportedSimulationFormulaHunter.getUnSupportFormula();
return unsupportedSimulationFormulaHunter.isSupported() ? null : unsupportedSimulationFormulaHunter.getUnSupportedNode();
} catch (Exception 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 String unSupportFormula;
private String unSupportedNode;
private String[] curReportVariables;
public UnsupportedSimulationNodeHunter() {
curReportVariables = VariableResolver.DEFAULT.resolveCurReportVariables();
}
public boolean isSupported() {
return supported;
}
public String getUnSupportFormula() {
return unSupportFormula;
public String getUnSupportedNode() {
return unSupportedNode;
}
public void hunter4Tiny(Tiny tiny) {
if (tiny.getClass() == ColumnRowRangeInPage.class) {
if (tiny.getClass() == ColumnRowRangeInPage.class || Arrays.asList(curReportVariables).contains(tiny.toString())) {
supported = false;
unSupportFormula = tiny.toString();
unSupportedNode = tiny.toString();
}
}
}

Loading…
Cancel
Save