}
}
@Override
public boolean validatePreferences() {
TemplateParser parser = new TemplateParser(waypointLabelPattern.getText());
try {
parser.parse();
} catch (ParseError e) {
JOptionPane.showMessageDialog(Main.parent, tr("Incorrect waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE);
waypointLabelPattern.requestFocus();
return false;
}
parser = new TemplateParser(audioWaypointLabelPattern.getText());
try {
parser.parse();
} catch (ParseError e) {
JOptionPane.showMessageDialog(Main.parent, tr("Incorrect audio waypoint label pattern: {0}", e.getMessage()), tr("Incorrect pattern"), JOptionPane.ERROR_MESSAGE);
audioWaypointLabelPattern.requestFocus();
return false;
}