Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangAtom


        ArrayList<IErlElement> modules = new ArrayList<IErlElement>();
        try {
            final OtpErlangObject obj = res.getValue();
            final OtpErlangTuple restuple = (OtpErlangTuple) obj;
            final OtpErlangAtom resindicator = (OtpErlangAtom) restuple.elementAt(0);
            if (resindicator.atomValue().equals("ok")) {

                final OtpErlangList modList = (OtpErlangList) restuple.elementAt(1);
                modules = createErlModuleList(modList);
            } else {
                final OtpErlangString s = (OtpErlangString) restuple.elementAt(1);
View Full Code Here


    public void setStatus(final String status) {
        fStatus = status;
    }

    public boolean getTrapExit() {
        final OtpErlangAtom res = (OtpErlangAtom) ErlideDebug.getProcessInfo(
                fBackend.getOtpRpc(), fPid, "trap_exit");
        return Boolean.parseBoolean(res.atomValue());
    }
View Full Code Here

                return new NoInterpretEvent(cmds);
            } else {
                return new IntEvent(cmds);
            }
        } catch (final Exception e) {
            return new IntEvent(new OtpErlangObject[] { new OtpErlangAtom("nop") });
        }
    }
View Full Code Here

                    savedStackTrace);
            if (bind != null) {
                final Collection<OtpErlangObject> trace = bind.getList("STrace");
                for (final OtpErlangObject oframe : trace) {
                    final OtpErlangTuple frame = (OtpErlangTuple) oframe;
                    final OtpErlangAtom m = (OtpErlangAtom) frame.elementAt(0);
                    final OtpErlangAtom f = (OtpErlangAtom) frame.elementAt(1);
                    final OtpErlangLong a = (OtpErlangLong) frame.elementAt(2);
                    try {
                        stackFrames.add(new ErlangUninterpretedStackFrame(m.atomValue(),
                                new ErlangFunction(f.atomValue(), a.intValue()), this,
                                getDebugTarget()));
                    } catch (final OtpErlangRangeException e) {
                        ErlLogger.error(e);
                    }
                }
View Full Code Here

            int stackFrameNo;
            final OtpErlangObject mfa0 = mfa.elementAt(0);
            if (!(mfa0 instanceof OtpErlangAtom)) {
                ErlLogger.debug("%s", mfa0);
            }
            final OtpErlangAtom m = (OtpErlangAtom) mfa0;
            final OtpErlangLong l = (OtpErlangLong) t.elementAt(1);
            final OtpErlangList bindings = (OtpErlangList) t.elementAt(2);
            final OtpErlangLong n = (OtpErlangLong) t.elementAt(3);
            int lin;
            try {
                lin = l.intValue();
            } catch (final OtpErlangRangeException e) {
                lin = -1;
            }
            final String mod = m.atomValue();
            try {
                stackFrameNo = n.intValue();
            } catch (final OtpErlangRangeException e) {
                stackFrameNo = -1;
            }
View Full Code Here

    @Override
    public void execute(final ErlangDebugTarget debugTarget) {
        final OtpErlangPid pid = (OtpErlangPid) cmds[1];
        final ErlangProcess erlangProcess = debugTarget.getOrCreateErlangProcess(pid);
        final OtpErlangAtom sa = (OtpErlangAtom) cmds[2];
        final String status = sa.atomValue();
        if (status.equals("break")) {
            handleBreakStatus(erlangProcess, status);
        } else if (status.equals("exit")) {
            handleExitStatus(erlangProcess, status);
        } else if (status.equals("running")) {
View Full Code Here

        super(cmds);
    }

    @Override
    public void execute(final ErlangDebugTarget debugTarget) {
        final OtpErlangAtom m = (OtpErlangAtom) cmds[1];
        debugTarget.getInterpretedModules().remove(m.atomValue());
        debugTarget.fireEvent(new DebugEvent(this, DebugEvent.MODEL_SPECIFIC,
                ErlangDebugTarget.INTERPRETED_MODULES_CHANGED));
    }
View Full Code Here

        super(cmds);
    }

    @Override
    public void execute(final ErlangDebugTarget debugTarget) {
        final OtpErlangAtom m = (OtpErlangAtom) cmds[1];
        debugTarget.getInterpretedModules().add(m.atomValue());
        debugTarget.fireEvent(new DebugEvent(this, DebugEvent.MODEL_SPECIFIC,
                ErlangDebugTarget.INTERPRETED_MODULES_CHANGED));
    }
View Full Code Here

    public IndentResult(final OtpErlangObject o) {
        if (o instanceof OtpErlangTuple && !Util.isError(o)) {
            final OtpErlangTuple t = (OtpErlangTuple) o;
            final OtpErlangLong l1 = (OtpErlangLong) t.elementAt(1);
            final OtpErlangAtom b = (OtpErlangAtom) t.elementAt(2);
            text = Util.stringValue(t.elementAt(0));
            try {
                removeNext = l1.intValue();
            } catch (final OtpErlangRangeException e) {
                removeNext = 0;
            }
            addNewLine = b.booleanValue();
        } else {
            addNewLine = false;
            text = "";
            removeNext = 0;
        }
View Full Code Here

    private String prefix;
    private final List<String> fields;

    public RecordCompletion(final OtpErlangTuple r) throws OtpErlangRangeException {
        final OtpErlangLong kindL = (OtpErlangLong) r.elementAt(0);
        final OtpErlangAtom nameA = (OtpErlangAtom) r.elementAt(1);
        final OtpErlangAtom prefixA = (OtpErlangAtom) r.elementAt(2);
        final OtpErlangList fieldL = (OtpErlangList) r.elementAt(3);
        kind = kindL.intValue();
        name = nameA.atomValue();
        prefix = prefixA.atomValue();
        // TODO we probably need another way to signal this...
        if (prefix.endsWith("><")) {
            prefix = "'" + prefix.substring(0, prefix.length() - 2);
        } else if ("<>".equals(prefix)) {
            prefix = "";
        } else {
            prefix = prefixA.toString();
            if (prefix.endsWith("'")) {
                prefix = prefix.substring(0, prefix.length() - 1);
            }
        }
        fields = new ArrayList<String>(fieldL.arity());
        for (final OtpErlangObject object : fieldL) {
            final OtpErlangAtom f = (OtpErlangAtom) object;
            getFields().add(f.atomValue());
        }
    }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangAtom

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.