Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangLong


    @Override
    public OtpErlangObject getSearchObject() {
        final OtpErlangObject t = makeSPatternObject(VARIABLE_DEF_ATOM,
                VARIABLE_REF_ATOM, name);
        return new OtpErlangTuple(new OtpErlangObject[] { VARIABLE_PATTERN_ATOM, t,
                new OtpErlangAtom(functionName), new OtpErlangLong(arity),
                new OtpErlangString(head) });
    }
View Full Code Here


                    final OtpErlangTuple t = (OtpErlangTuple) o;
                    final OtpErlangTuple t2 = (OtpErlangTuple) t.elementAt(1);
                    final OtpErlangTuple ieval = (OtpErlangTuple) t2.elementAt(0);
                    final OtpErlangAtom mod = (OtpErlangAtom) ieval.elementAt(3);
                    final String module = mod.atomValue();
                    final OtpErlangLong lin = (OtpErlangLong) ieval.elementAt(2);
                    try {
                        final int line = lin.intValue();
                        gotoModuleLine(module, line);
                    } catch (final OtpErlangRangeException e1) {
                    }

                }
View Full Code Here

                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

            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;
            }
            stackFrames.add(new ErlangStackFrame(mod, this, target, lin, null, bindings,
                    stackFrameNo));
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 {
View Full Code Here

    private final String name;
    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);
View Full Code Here

                } else {
                    kind = KIND_OTHER;
                }
            } else {
                try {
                    final OtpErlangLong l = (OtpErlangLong) parts[1];
                    kind = l.intValue();
                } catch (final OtpErlangRangeException e1) {
                    kind = KIND_OTHER;
                }
            }
View Full Code Here

    private static OtpErlangObject make3Tuple(final OtpErlangAtom atom, final String s,
            final int a) {
        if (a >= 0) {
            return new OtpErlangTuple(new OtpErlangObject[] { atom, new OtpErlangAtom(s),
                    new OtpErlangLong(a) });
        }
        return new OtpErlangTuple(new OtpErlangObject[] { atom, new OtpErlangAtom(s),
                UNDEFINED });

    }
View Full Code Here

    private static OtpErlangObject make4Tuple(final OtpErlangAtom atom, final String s1,
            final String s2, final int a) {
        if (a >= 0) {
            return new OtpErlangTuple(new OtpErlangObject[] { atom,
                    new OtpErlangAtom(s1), new OtpErlangAtom(s2), new OtpErlangLong(a) });
        }
        return new OtpErlangTuple(new OtpErlangObject[] { atom, new OtpErlangAtom(s1),
                new OtpErlangAtom(s2), UNDEFINED });
    }
View Full Code Here

                    sev = IMarker.SEVERITY_ERROR;
                } else if (tag.equals(WARNING)) {
                    sev = IMarker.SEVERITY_WARNING;
                }
            } else {
                final OtpErlangLong tag = (OtpErlangLong) sev_tag;
                try {
                    switch (tag.intValue()) {
                    case 0:
                        sev = IMarker.SEVERITY_ERROR;
                        break;
                    case 1:
                        sev = IMarker.SEVERITY_WARNING;
View Full Code Here

TOP

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

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.