Browse Source

Pull request #6865: REPORT-62175 && REPORT-63204

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

* commit '3a751c0122c548426d984876ca43c888cf263846':
  REPORT-62175 && REPORT-63204 1.埋点适配 2.针对sum(1,)等此类公式进行合法性判断
bugfix/11.0
Hoky.He 3 years ago
parent
commit
68cd7d858f
  1. 32
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

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

@ -341,13 +341,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
@Override
public void focusGained(FocusEvent e) {
// 获得焦点时 安装
if (autoCompletion == null && autoCompletionCheck.isSelected()) {
CompletionProvider provider = createCompletionProvider();
autoCompletion = new FormulaPaneAutoCompletion(provider);
autoCompletion.setListCellRenderer(new CompletionCellRenderer());
autoCompletion.install(formulaTextArea);
autoCompletion.installVariableTree(variableTreeAndDescriptionArea);
}
installAutoCompletion();
}
@Override
@ -410,6 +404,16 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
}
}
private void installAutoCompletion() {
if (autoCompletion == null && autoCompletionCheck.isSelected()) {
CompletionProvider provider = createCompletionProvider();
autoCompletion = new FormulaPaneAutoCompletion(provider);
autoCompletion.setListCellRenderer(new CompletionCellRenderer());
autoCompletion.install(formulaTextArea);
autoCompletion.installVariableTree(variableTreeAndDescriptionArea);
}
}
protected void extendCheckBoxPane(JPanel checkBoxPane) {
@ -795,11 +799,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
}
};
private final ActionListener calculateActionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
private void calculateFormula() {
String formulaText = formulaTextArea.getText().trim();
String unSupportFormula = containsUnsupportedSimulationFormulas(formulaText);
if (unSupportFormula != null) {
@ -848,6 +848,14 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
confirmCheckResult(checkResult, messageTips);
}
}
private final ActionListener calculateActionListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
calculateFormula();
}
};
private boolean confirmCheckResult(FormulaCheckResult checkResult, String messageTips) {

Loading…
Cancel
Save