|
|
|
@ -665,7 +665,6 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
|
|
|
|
|
.getFunctionChecker(node) |
|
|
|
|
.checkFunction(node) ? VALID_FORMULA : INVALID_FORMULA; |
|
|
|
|
} catch (ConditionCheckWrongException cce) { |
|
|
|
|
List<FunctionRule> rules = cce.getRules(); |
|
|
|
|
String functionName = cce.getFunctionName(); |
|
|
|
|
StringBuilder errorMsg = new StringBuilder(functionName + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Condition_Tips") + ":"); |
|
|
|
|
return errorMsg.toString(); |
|
|
|
@ -716,7 +715,15 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
|
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
String formulaText = formulaTextArea.getText().trim(); |
|
|
|
|
String messageTips = getFormulaValidMessage(formulaText).equals(VALID_FORMULA) ? " " : getFormulaValidMessage(formulaText) + "\n"; |
|
|
|
|
String formulaValidMessage = getFormulaValidMessage(formulaText); |
|
|
|
|
if (formulaValidMessage.equals(INVALID_FORMULA)) { |
|
|
|
|
FineJOptionPane.showMessageDialog( |
|
|
|
|
FormulaPane.this, |
|
|
|
|
formulaValidMessage, |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), |
|
|
|
|
JOptionPane.INFORMATION_MESSAGE); |
|
|
|
|
} else { |
|
|
|
|
String messageTips = formulaValidMessage.equals(VALID_FORMULA) ? "" : formulaValidMessage + "\n"; |
|
|
|
|
Map<String, Object> paramsMap = setParamsIfExist(formulaText); |
|
|
|
|
Calculator calculator = Calculator.createCalculator(); |
|
|
|
|
ParameterMapNameSpace parameterMapNameSpace = ParameterMapNameSpace.create(paramsMap); |
|
|
|
@ -740,7 +747,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
|
|
|
|
|
messageTips, |
|
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Tool_Tips"), |
|
|
|
|
JOptionPane.INFORMATION_MESSAGE); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|