@Override public void action(final Object cmp) { final StringBuilder bind = new StringBuilder(); final int cl = context.length; for (int c = 0; c < cl; c += 2) { final String key = context[c].getText().replaceAll("^\\$", ""); if (key.isEmpty()) continue; if (bind.length() != 0) bind.append(','); bind.append(key.replaceAll(",", ",,")).append('='); bind.append(context[c + 1].getText().replaceAll(",", ",,")); } gui.context.options.set(MainOptions.BINDINGS, bind.toString()); }