Search in sources :

Example 1 with ParserException

use of org.erlide.engine.services.parsing.ParserException in project erlide_eclipse by erlang.

the class ErlangConsolePage method isInputComplete.

boolean isInputComplete() {
    if (!backend.getRuntime().isRunning()) {
        return false;
    }
    try {
        final String str = consoleInputText.getText() + " ";
        final RuntimeHelper helper = new RuntimeHelper(backend.getOtpRpc());
        final OtpErlangObject o = helper.parseConsoleInput(str);
        if (o instanceof OtpErlangList && ((OtpErlangList) o).arity() == 0) {
            return false;
        }
        if (!(o instanceof OtpErlangList)) {
            return false;
        }
    } catch (final ParserException e) {
        return false;
    }
    return true;
}
Also used : ParserException(org.erlide.engine.services.parsing.ParserException) OtpErlangList(com.ericsson.otp.erlang.OtpErlangList) OtpErlangObject(com.ericsson.otp.erlang.OtpErlangObject) RuntimeHelper(org.erlide.engine.services.parsing.RuntimeHelper)

Aggregations

OtpErlangList (com.ericsson.otp.erlang.OtpErlangList)1 OtpErlangObject (com.ericsson.otp.erlang.OtpErlangObject)1 ParserException (org.erlide.engine.services.parsing.ParserException)1 RuntimeHelper (org.erlide.engine.services.parsing.RuntimeHelper)1