Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangList$SubList


            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);
                MessageDialog.openError(shell, "Error", s.stringValue());
                return;
View Full Code Here


        if (el0 instanceof OtpErlangTuple) {
            final OtpErlangTuple t = (OtpErlangTuple) el0;
            savedStackTrace = t.elementAt(1);
            el0 = t.elementAt(0);
        }
        final OtpErlangList erlStackFrames = (OtpErlangList) el0;
        final OtpErlangList bs = (OtpErlangList) stackAndBindings.elementAt(1);
        setStackFrames(module, line, erlStackFrames, bs);
        if (savedStackTrace instanceof OtpErlangTuple) {
            addStackTrace((OtpErlangTuple) savedStackTrace);
        }
    }
View Full Code Here

            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) {
View Full Code Here

    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

    private final List<String> directories;

    public ErlProjectImport(final OtpErlangObject o) {
        final OtpErlangTuple t = (OtpErlangTuple) o;

        OtpErlangList l = (OtpErlangList) t.elementAt(0);
        resources = new TreeSet<String>(Util.asStringList(l));

        l = (OtpErlangList) t.elementAt(1);
        sourceDirs = Util.asStringList(l);
View Full Code Here

    }

    private OtpErlangObject returnRefsAndOrDefs(final OtpErlangObject refs,
            final OtpErlangObject defs) {
        if (limitTo == LimitTo.ALL_OCCURRENCES) {
            return new OtpErlangList(new OtpErlangObject[] { refs, defs });
        } else if (limitTo == LimitTo.REFERENCES) {
            return new OtpErlangList(new OtpErlangObject[] { refs });
        } else {
            return new OtpErlangList(new OtpErlangObject[] { defs });
        }
    }
View Full Code Here

    }

    public void interpret(final IProject project, final String moduleName,
            final boolean distributed, final boolean interpret) {
        ErlLogger.debug((interpret ? "" : "de") + "interpret " + moduleName);
        final OtpErlangList options = getProjectDirs(project);
        ErlideDebug.interpret(backend.getOtpRpc(), moduleName, options, distributed,
                interpret);
    }
View Full Code Here

        } catch (final TermParserException e) {
            ErlLogger.warn(e);
        } catch (final SignatureException e) {
            ErlLogger.warn(e);
        }
        return new OtpErlangList();
    }
View Full Code Here

            return null;
        }
    }

    private void addNodesAsDebugTargets(final ILaunch aLaunch) {
        final OtpErlangList nodes = ErlideDebug.nodes(backend.getOtpRpc());
        if (nodes != null) {
            for (int i = 1, n = nodes.arity(); i < n; ++i) {
                final OtpErlangAtom a = (OtpErlangAtom) nodes.elementAt(i);
                final IDebugTarget edn = new ErlangDebugNode(this, a.atomValue());
                aLaunch.addDebugTarget(edn);
            }
        }
    }
View Full Code Here

                try {
                    arity = l.intValue();
                } catch (final OtpErlangRangeException e) {
                }
            } else if (parameters instanceof OtpErlangList) {
                final OtpErlangList l = (OtpErlangList) parameters;
                arity = l.arity();
            }
        }
        name = a.atomValue();
    }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangList$SubList

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.