|
|
|
@ -342,7 +342,7 @@ public class GroupFormulaPane extends BasicPane implements UIFormula, OperateLis
|
|
|
|
|
} |
|
|
|
|
}).setVisible(true); |
|
|
|
|
} |
|
|
|
|
calculator.pushNameSpace(ParameterKit.createParameterMapNameSpace(parameterMap)); |
|
|
|
|
calculator.pushNameSpace(ParameterKit.createParameterMapNameSpace(realMap(parameterMap))); |
|
|
|
|
String message; |
|
|
|
|
try { |
|
|
|
|
Object result = formula.evalValue(calculator); |
|
|
|
@ -353,6 +353,19 @@ public class GroupFormulaPane extends BasicPane implements UIFormula, OperateLis
|
|
|
|
|
return message; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Map<String, Object> realMap(Map<String, Object> source) { |
|
|
|
|
Map<String, Object> map = new HashMap<String, Object>(); |
|
|
|
|
for (Map.Entry<String, Object> entry : source.entrySet()) { |
|
|
|
|
String name = entry.getKey(); |
|
|
|
|
if (name.startsWith("$")) { |
|
|
|
|
map.put(name.substring(1), entry.getValue()); |
|
|
|
|
} else { |
|
|
|
|
map.put(name, entry.getValue()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class VariableTreeAndDescriptionArea extends JPanel { |
|
|
|
|
|
|
|
|
|
private JTree variablesTree; |
|
|
|
|