Package org.erlide.runtime.rpc

Examples of org.erlide.runtime.rpc.RpcResult


     *            parameters array
     * @return parsed RPC message
     */
    public IRpcMessage callWithParser(final IRpcMessage parser,
            final String functionName, final String signature, final Object... parameters) {
        final RpcResult res = callWithoutParser(functionName, signature, parameters);
        parser.parse(res);
        return parser;
    }
View Full Code Here


                .getWranglerSelection();
        if (sel == null) {
            return "";
        }

        final RpcResult res = WranglerBackendManager.getRefactoringBackend()
                .callWithoutParser("get_fun_name_eclipse", "siixi", sel.getFilePath(),
                        sel.getSelectionRange().getStartLine(),
                        sel.getSelectionRange().getStartCol(), sel.getSearchPath(),
                        GlobalParameters.getTabWidth());

        if (res.getValue().getClass().equals(OtpErlangString.class)) {
            return ((OtpErlangString) res.getValue()).stringValue();
        }
        return "";
    }
View Full Code Here

    public boolean fetchParPrompts() {
        if (fetched) {
            return true;
        }

        final RpcResult res = WranglerBackendManager.getRefactoringBackend()
                .callWithoutParser("input_par_prompts_eclipse", "s", callbackModule);
        final OtpErlangList params = (OtpErlangList) ((OtpErlangTuple) res.getValue())
                .elementAt(1);
        parPrompts.clear();
        for (final OtpErlangObject obj : params.elements()) {
            parPrompts.add(obj.toString().replace("\"", ""));
        }
View Full Code Here

        this.backend = backend;
    }

    protected OtpErlangTuple parseFile(final IFile f) {
        final String filePath = f.getLocation().toOSString();
        final RpcResult res = backend
                .call_noexception(MODULE, PARSE_FUNCTION, "sax", filePath, "true",
                        GlobalParameters.getWranglerSelection().getSearchPath());
        return parseParserResult(res.getValue());
    }
View Full Code Here

    protected SyntaxInfo varToPos(final OtpErlangTuple syntaxTree, final int line,
            final int col) {
        final OtpErlangInt[] position = new OtpErlangInt[2];
        position[0] = new OtpErlangInt(line);
        position[1] = new OtpErlangInt(col);
        final RpcResult res = backend.call_noexception(INTERFACE_MODULE, VAR_FUNCTION,
                "xx", syntaxTree, new OtpErlangTuple(position));
        return parseVarInfo(res.getValue());
    }
View Full Code Here

     * @throws CoreException
     *             detailed exception about the loading process errors
     */
    private void initWrangler() throws CoreException {
        final IOtpRpc mb = getBackend();
        RpcResult res = mb.call_noexception("wrangler_refacs", "init_eclipse", "",
                new Object[0]);
        ErlLogger.debug("Wrangler app started:\n" + res);
        res = mb.call_noexception("wrangler_error_logger", "init", "x",
                new OtpErlangList());

View Full Code Here

     * Checks whether there is any warning messages, if yes displays a view,
     * containg all of them.
     */
    protected void checkWarningMessages() {
        try {
            final RpcResult res = WranglerBackendManager.getRefactoringBackend()
                    .getLoggedInfo();

            if (res.isOk()) {
                final OtpErlangObject resobj = res.getValue();
                if (!resobj.equals(new OtpErlangList())) {
                    final OtpErlangList reslist = (OtpErlangList) resobj;
                    for (int i = 0; i < reslist.arity(); ++i) {
                        final OtpErlangTuple restuple = (OtpErlangTuple) reslist
                                .elementAt(i);
View Full Code Here

     */
    public static boolean hasQuickCheck() {
        if (isQCchecked) {
            return hasQuickCheck;
        }
        final RpcResult res = Activator.getDefault().getBackend()
                .call_noexception("code", "which", "a", "eqc");
        if (!res.isOk()) {
            return false;
        }
        if (res.getValue() instanceof OtpErlangString) {
            hasQuickCheck = true;
            isQCchecked = true;
        } else {
            isQCchecked = true;
            hasQuickCheck = false;
View Full Code Here

TOP

Related Classes of org.erlide.runtime.rpc.RpcResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.