Package com.ericsson.otp.erlang

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


    private OtpErlangObject concreteTerm(final OtpErlangObject val) {
        if (val instanceof OtpErlangList) {
            final OtpErlangList ll = (OtpErlangList) val;
            final OtpErlangObject[] res = new OtpErlangObject[ll.arity()];
            for (int i = 0; i < ll.arity(); i++) {
                res[i] = concreteTerm(ll.elementAt(i));
            }
            return new OtpErlangList(res);
        }
        try {
            return helper.concreteSyntax(val);
View Full Code Here


        final URI path = getTmpURIPath("");
        pvm.setURIValue(PV, path);
        final OtpErlangList pathVars2 = model.getPathVars(project.getWorkspaceProject());
        assertEquals(n + 1, pathVars2.arity());

        final OtpErlangTuple t = (OtpErlangTuple) pathVars2.elementAt(0);
        final String name = Util.stringValue(t.elementAt(0));
        final String value = pvm.getURIValue(name).getPath();
        String value2 = Util.stringValue(t.elementAt(1));
        if (!value2.startsWith("/")) {
            value2 = "/" + value2;
View Full Code Here

            for (final IPath sp : sd) {
                dirList[j++] = project.getLocation().toPortableString() + "/" + sp;
            }
            final OtpErlangList res = getSourceClashes(backend, dirList);
            for (int i = 0; i < res.arity(); i++) {
                final OtpErlangTuple t = (OtpErlangTuple) res.elementAt(i);
                final String f1 = ((OtpErlangString) t.elementAt(0)).stringValue();
                final String f2 = ((OtpErlangString) t.elementAt(1)).stringValue();
                MarkerUtils.createProblemMarker(project, null,
                        "duplicated module name in " + f1 + " and " + f2, 0,
                        IMarker.SEVERITY_WARNING);
View Full Code Here

                    return;
                }

                duplicates = new ArrayList<DuplicatedCodeElement>();
                for (int i = 0; i < resultList.arity(); ++i) {
                    duplicates.add(parseDuplicates(resultList.elementAt(i)));
                }
                isSuccessful = true;
            }
        } catch (final Exception e) {
            setUnSuccessful(e.getMessage());
View Full Code Here

            final OtpErlangTuple t = (OtpErlangTuple) value;
            final int ofs = record != null ? 1 : 0;
            return t.elementAt(index + ofs);
        } else if (value instanceof OtpErlangList) {
            final OtpErlangList l = (OtpErlangList) value;
            return l.elementAt(index);
        } else if (value instanceof OtpErlangBinary) {
            final OtpErlangBinary bs = (OtpErlangBinary) value;
            int j = bs.binaryValue()[index];
            if (j < 0) {
                j += 256;
View Full Code Here

        final OtpErlangAtom resindicator = (OtpErlangAtom) restuple.elementAt(0);
        if (resindicator.atomValue().equals("ok")) {
            final OtpErlangList erlangFunctionList = (OtpErlangList) restuple
                    .elementAt(1);
            for (int i = 0; i < erlangFunctionList.arity(); ++i) {
                final OtpErlangTuple fTuple = (OtpErlangTuple) erlangFunctionList
                        .elementAt(i);
                IErlFunctionClause f;
                try {
                    f = extractFunction(fTuple);
                    elements.add(f);
View Full Code Here

    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

            if (res.isOk()) {
                final OtpErlangObject resobj = res.getValue();
                if (!resobj.equals(new OtpErlangList())) {
                    final OtpErlangList reslist = (OtpErlangList) resobj;
                    for (int i = 0; i < reslist.arity(); ++i) {
                        final OtpErlangTuple restuple = (OtpErlangTuple) reslist
                                .elementAt(i);
                        final String formattedString = formatWarningString(OtpErlang
                                .asString(restuple.elementAt(1)));
                        WarningViewManager.addWarningMessage(formattedString);
                    }
View Full Code Here

       
        if (tail instanceof OtpErlangList)
        {// merge this into the current list.
          OtpErlangList tailAsList = (OtpErlangList)tail;
          for(int i=0;i<tailAsList.arity();++i)
            listComponents.add(tailAsList.elementAt(i));
          tail = tailAsList.getLastTail();
        }
      }
     
      OtpErlangList outcome = null;
View Full Code Here

       
        if (tail instanceof OtpErlangList)
        {// merge this into the current list.
          OtpErlangList tailAsList = (OtpErlangList)tail;
          for(int i=0;i<tailAsList.arity();++i)
            listComponents.add(tailAsList.elementAt(i));
          tail = tailAsList.getLastTail();
        }
      }
     
      OtpErlangList outcome = null;
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.