}
}
}
ExpressionNode node = null;
try {
ExpressionParser ep = new ExpressionParser(expression);
// Add the data sources as variables, once conflicts are resolved
for (int i = 0; i < clm.size(); ++i) {
VariableConflict vc = (VariableConflict) clm.get(i);
ep.addVariable(new VariableAssociation(vc.ds, vc.var));
}
// Add known plugins => may bring in more mathematical functions
for (Iterator it = Run.plugins.iterator(); it.hasNext();) {
ep.addClass(it.next().getClass());
}
node = ep.parse();
} catch (ParseException pe) {
// Also catches duplicate variable names
JOptionPane.showMessageDialog(JSynoptic.gui.getOwner(), pe.getLocalizedMessage(), resources
.getString("CantRestoreExpression")
+ expression, JOptionPane.ERROR_MESSAGE);