Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangTuple.elementAt()


        node.addChildren(processNode);

        final OtpErlangList list = (OtpErlangList) tuple.elementAt(INDEX_INFO);
        for (final OtpErlangObject otpErlangObject : list) {
            final OtpErlangTuple infoTuple = (OtpErlangTuple) otpErlangObject;
            final OtpErlangObject key = infoTuple.elementAt(0);
            final OtpErlangObject value = infoTuple.elementAt(1);
            final TreeNode treeNode = new TreeNode(key.toString() + ": "
                    + value.toString());
            treeNode.setImage(Activator.getImage(Images.INFO_NODE));
            node.addChildren(treeNode);
View Full Code Here


        final OtpErlangList list = (OtpErlangList) tuple.elementAt(INDEX_INFO);
        for (final OtpErlangObject otpErlangObject : list) {
            final OtpErlangTuple infoTuple = (OtpErlangTuple) otpErlangObject;
            final OtpErlangObject key = infoTuple.elementAt(0);
            final OtpErlangObject value = infoTuple.elementAt(1);
            final TreeNode treeNode = new TreeNode(key.toString() + ": "
                    + value.toString());
            treeNode.setImage(Activator.getImage(Images.INFO_NODE));
            node.addChildren(treeNode);
        }
View Full Code Here

                tuple.elementAt(INDEX_PROCESS));
        processNode.setImage(Activator.getImage(Images.PROCESS_NODE));

        final OtpErlangTuple exceptionTuple = (OtpErlangTuple) tuple
                .elementAt(INDEX_EXCEPTION);
        final OtpErlangObject exceptionClass = exceptionTuple
                .elementAt(INDEX_EXCEPTION_CLASS);
        final OtpErlangObject exceptionValue = exceptionTuple
                .elementAt(INDEX_EXCEPTION_VALUE);
        labelBuilder.append(exceptionClass.toString());
View Full Code Here

        final OtpErlangTuple exceptionTuple = (OtpErlangTuple) tuple
                .elementAt(INDEX_EXCEPTION);
        final OtpErlangObject exceptionClass = exceptionTuple
                .elementAt(INDEX_EXCEPTION_CLASS);
        final OtpErlangObject exceptionValue = exceptionTuple
                .elementAt(INDEX_EXCEPTION_VALUE);
        labelBuilder.append(exceptionClass.toString());

        final ITreeNode exceptionClassNode = new TreeNode(exceptionClass.toString(),
                Activator.getImage(Images.INFO_NODE));
View Full Code Here

        } catch (final Exception e) {
            ErlLogger.warn(e);
        }
        if (r instanceof OtpErlangTuple) {
            final OtpErlangTuple t = (OtpErlangTuple) r;
            if (((OtpErlangAtom) t.elementAt(0)).atomValue().compareTo("module") == 0) {
                return true;
            }
            // code couldn't be loaded
            // maybe here we should throw exception?
            return false;
View Full Code Here

            final OtpErlangList loaded = (OtpErlangList) backend.call("code",
                    "all_loaded", "");
            final List<OtpErlangAtom> mine = new ArrayList<OtpErlangAtom>();
            for (final OtpErlangObject elem : loaded) {
                final OtpErlangTuple t = (OtpErlangTuple) elem;
                final OtpErlangAtom mod = (OtpErlangAtom) t.elementAt(0);
                if (mod.atomValue().startsWith("erlide_")) {
                    // ErlLogger.debug(">>> HAD " + mod + "   " +
                    // t.elementAt(1));
                    mine.add(mod);
                }
View Full Code Here

        return status;
    }

    private TracingStatus processResult(final OtpErlangObject callResult) {
        final OtpErlangTuple tuple = (OtpErlangTuple) callResult;
        if (((OtpErlangAtom) tuple.elementAt(0)).atomValue().equals("error")) {
            errorObject = tuple.elementAt(1);
            return TracingStatus.ERROR;
        }
        final OtpErlangList nodeNames = (OtpErlangList) tuple.elementAt(1);
        activatedNodes = new ArrayList<String>();
View Full Code Here

    }

    private TracingStatus processResult(final OtpErlangObject callResult) {
        final OtpErlangTuple tuple = (OtpErlangTuple) callResult;
        if (((OtpErlangAtom) tuple.elementAt(0)).atomValue().equals("error")) {
            errorObject = tuple.elementAt(1);
            return TracingStatus.ERROR;
        }
        final OtpErlangList nodeNames = (OtpErlangList) tuple.elementAt(1);
        activatedNodes = new ArrayList<String>();
        for (final OtpErlangObject nodeName : nodeNames) {
View Full Code Here

        final OtpErlangTuple tuple = (OtpErlangTuple) callResult;
        if (((OtpErlangAtom) tuple.elementAt(0)).atomValue().equals("error")) {
            errorObject = tuple.elementAt(1);
            return TracingStatus.ERROR;
        }
        final OtpErlangList nodeNames = (OtpErlangList) tuple.elementAt(1);
        activatedNodes = new ArrayList<String>();
        for (final OtpErlangObject nodeName : nodeNames) {
            final String nodeNameString = ((OtpErlangAtom) nodeName).atomValue();
            activatedNodes.add(nodeNameString);
            notActivatedNodes.remove(nodeNameString);
View Full Code Here

    public List<IStackFrame> getStackFrames(final IDebugTarget target,
            final IThread process) {
        // XXX JC copy paste
        final OtpErlangTuple tuple = getTuple();
        final OtpErlangList erlStackFrames = (OtpErlangList) tuple.elementAt(2);
        final OtpErlangTuple t2 = (OtpErlangTuple) tuple.elementAt(1);
        final OtpErlangTuple ieval = (OtpErlangTuple) t2.elementAt(0);
        OtpErlangAtom m = (OtpErlangAtom) ieval.elementAt(3);
        OtpErlangList bindings = (OtpErlangList) t2.elementAt(t2.arity() - 1);
        OtpErlangLong l = (OtpErlangLong) ieval.elementAt(1);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.