Package com.ericsson.otp.erlang

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


        if (!(r1 instanceof OtpErlangTuple)) {
            return null;
        }
        final OtpErlangTuple t1 = (OtpErlangTuple) r1;
        if (Util.isOk(t1)) {
            final OtpErlangObject ot = t1.elementAt(1);
            if (ot instanceof OtpErlangTuple) {
                final OtpErlangTuple tt = (OtpErlangTuple) ot;
                return new ErlToken(tt);
            }
        }
View Full Code Here


        }
        final OtpErlangTuple t1 = (OtpErlangTuple) r1;

        List<ErlToken> toks = null;
        if (Util.isOk(t1)) {
            if (t1.elementAt(1) instanceof OtpErlangBinary) {
                final OtpErlangBinary b = (OtpErlangBinary) t1.elementAt(1);
                final byte[] bytes = b.binaryValue();
                toks = new ArrayList<ErlToken>(bytes.length / 10);
                for (int i = 0; i < bytes.length; i += 10) {
                    final ErlToken tk = new ErlToken(bytes, i, offset);
View Full Code Here

        final OtpErlangTuple t1 = (OtpErlangTuple) r1;

        List<ErlToken> toks = null;
        if (Util.isOk(t1)) {
            if (t1.elementAt(1) instanceof OtpErlangBinary) {
                final OtpErlangBinary b = (OtpErlangBinary) t1.elementAt(1);
                final byte[] bytes = b.binaryValue();
                toks = new ArrayList<ErlToken>(bytes.length / 10);
                for (int i = 0; i < bytes.length; i += 10) {
                    final ErlToken tk = new ErlToken(bytes, i, offset);
                    toks.add(tk);
View Full Code Here

        } else {
            res = ErlideNoparse.reparse(backend, scannerName, updateSearchServer);
        }
        if (Util.isOk(res)) {
            final OtpErlangTuple t = (OtpErlangTuple) res.elementAt(1);
            forms = (OtpErlangList) t.elementAt(1);
            comments = (OtpErlangList) t.elementAt(2);
        } else {
            ErlLogger.error("error when parsing %s: %s", path, res);
        }
        if (forms == null) {
View Full Code Here

            res = ErlideNoparse.reparse(backend, scannerName, updateSearchServer);
        }
        if (Util.isOk(res)) {
            final OtpErlangTuple t = (OtpErlangTuple) res.elementAt(1);
            forms = (OtpErlangList) t.elementAt(1);
            comments = (OtpErlangList) t.elementAt(2);
        } else {
            ErlLogger.error("error when parsing %s: %s", path, res);
        }
        if (forms == null) {
            module.setChildren(null);
View Full Code Here

        final String typeS = type.atomValue();
        if ("error".equals(typeS)) {
            final OtpErlangTuple er = (OtpErlangTuple) el.elementAt(1);
            final String msg = helper.formatError(er);
            final ErlParserProblem e = ErlParserProblem.newError(module, msg);
            setPos(e, er.elementAt(0));
            return e;
        } else if ("tree".equals(typeS)) {
            final OtpErlangTuple atr = (OtpErlangTuple) el.elementAt(3);
            final OtpErlangObject pos = ((OtpErlangTuple) el.elementAt(2)).elementAt(1);
            final OtpErlangTuple name = (OtpErlangTuple) atr.elementAt(1);
View Full Code Here

    }

    private void setNamePos(final ErlMember f, final OtpErlangTuple namePos)
            throws OtpErlangRangeException {
        final OtpErlangTuple tpos1 = (OtpErlangTuple) namePos.elementAt(0);
        final int ofs = ((OtpErlangLong) tpos1.elementAt(1)).intValue();
        final int len = ((OtpErlangLong) namePos.elementAt(1)).intValue();
        f.setNameRange(ofs, len);
    }

    private IErlMember addAttribute(final IErlModule module, final OtpErlangObject pos,
View Full Code Here

                        .toString();
                final OtpErlangTuple otpDoc = (OtpErlangTuple) ErlangEngine.getInstance()
                        .getService(OtpDocService.class)
                        .getOtpDoc(backend, functionCall, stateDir);
                if (Util.isOk(otpDoc)) {
                    final String docStr = Util.stringValue(otpDoc.elementAt(1));
                    final StringBuffer result = new StringBuffer(docStr);
                    String docPath = "";
                    String anchor = "";
                    if (otpDoc.arity() > 4) {
                        docPath = Util.stringValue(otpDoc.elementAt(3));
View Full Code Here

                    final String docStr = Util.stringValue(otpDoc.elementAt(1));
                    final StringBuffer result = new StringBuffer(docStr);
                    String docPath = "";
                    String anchor = "";
                    if (otpDoc.arity() > 4) {
                        docPath = Util.stringValue(otpDoc.elementAt(3));
                        anchor = Util.stringValue(otpDoc.elementAt(4));
                    }
                    if (result.length() > 0) {
                        final String html = HoverUtil.getHTMLAndReplaceJSLinks(result);
                        final Object element = OpenResult.build(otpDoc.elementAt(2));
View Full Code Here

                    final StringBuffer result = new StringBuffer(docStr);
                    String docPath = "";
                    String anchor = "";
                    if (otpDoc.arity() > 4) {
                        docPath = Util.stringValue(otpDoc.elementAt(3));
                        anchor = Util.stringValue(otpDoc.elementAt(4));
                    }
                    if (result.length() > 0) {
                        final String html = HoverUtil.getHTMLAndReplaceJSLinks(result);
                        final Object element = OpenResult.build(otpDoc.elementAt(2));
                        input = new ErlBrowserInformationControlInput(input, editor,
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.