return null;
}
try {
final IOtpRpc backend = getBackend();
final OtpErlangTuple tuple = (OtpErlangTuple) backend.call(
Constants.ERLANG_HELPER_MODULE, Constants.FUN_STR2MS, "s",
new OtpErlangString(newText));
if (((OtpErlangAtom) tuple.elementAt(0)).atomValue().equals("ok")) {
// correct match spec - update
((MatchSpec) getValue()).setFunctionString(newText);
((MatchSpec) getValue()).setMsObject(tuple.elementAt(1));
return null;
}
// incorrect match spec
final OtpErlangAtom errorType = (OtpErlangAtom) tuple.elementAt(1);
if (errorType.atomValue().equals("standard_info")) {
final OtpErlangTuple errorTuple = (OtpErlangTuple) tuple.elementAt(2);
final StringBuilder builder = new StringBuilder("Line ");
builder.append(errorTuple.elementAt(0)).append(": ");
final OtpErlangList errorList = (OtpErlangList) errorTuple
.elementAt(2);
builder.append(((OtpErlangString) errorList.elementAt(0))
.stringValue());
if (errorList.elementAt(1) instanceof OtpErlangString) {
builder.append(((OtpErlangString) errorList.elementAt(1))