@ -387,7 +387,6 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
}
completionProvider . addCompletion ( new FormulaCompletion ( completionProvider , paramWithoutPre , BaseUtils . readIcon ( PARAM_ICON ) ) ) ;
}
completionProvider . addCompletion ( new FormulaCompletion ( completionProvider , "$$$" , BaseUtils . readIcon ( PARAM_ICON ) ) ) ;
return completionProvider ;
}
@ -787,7 +786,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
// Execute Formula default cell element.
String formulaText = formulaTextArea . getText ( ) . trim ( ) ;
FormulaCheckResult checkResult = FormulaChecker . check ( formulaText ) ;
confirmCheckResult ( checkResult ) ;
confirmCheckResult ( checkResult , checkResult . getTips ( ) ) ;
}
} ;
@ -804,7 +803,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
String messageTips ;
FormulaCheckResult checkResult = FormulaChecker . check ( formulaText ) ;
if ( checkResult . is Valid( ) ) {
if ( checkResult . grammar Valid( ) ) {
messageTips = checkResult . getTips ( ) + NEWLINE ;
Map < String , Object > paramsMap = setParamsIfExist ( formulaText ) ;
Calculator calculator = Calculator . createCalculator ( ) ;
@ -836,12 +835,12 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
if ( checkResult . isValid ( ) ) {
showMessageDialog ( messageTips , checkResult . isValid ( ) ) ;
} else {
confirmCheckResult ( checkResult ) ;
confirmCheckResult ( checkResult , messageTips ) ;
}
}
} ;
private boolean confirmCheckResult ( FormulaCheckResult checkResult ) {
private boolean confirmCheckResult ( FormulaCheckResult checkResult , String messageTips ) {
if ( checkResult . isValid ( ) ) {
showMessageDialog ( checkResult . getTips ( ) , checkResult . isValid ( ) ) ;
} else {
@ -849,7 +848,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
+ Toolkit . i18nText ( "Fine-Design_Basic_Formula_Error_Position" ) + " " ;
int confirmDialog = FineJOptionPane . showConfirmDialog (
FormulaPane . this ,
position + checkResult . getTips ( ) ,
position + messageTips ,
com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Basic_Tool_Tips" ) ,
JOptionPane . YES_NO_OPTION ,
JOptionPane . WARNING_MESSAGE ,
@ -902,7 +901,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula {
String formula = formulaTextArea . getText ( ) . trim ( ) ;
FormulaCheckResult checkResult = FormulaChecker . check ( formula ) ;
if ( ! checkResult . isValid ( ) ) {
return confirmCheckResult ( checkResult ) ;
return confirmCheckResult ( checkResult , checkResult . getTips ( ) ) ;
}
}
return true ;