Package com.ericsson.otp.erlang

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


  }
 
  public static void addSearchResult(final List<ModuleLineFunctionArityRef> result, final OtpErlangObject r) throws OtpErlangRangeException {
    final OtpErlangTuple t = ((OtpErlangTuple) r);
    OtpErlangObject _elementAt = t.elementAt(1);
    final OtpErlangList l = ((OtpErlangList) _elementAt);
    for (final OtpErlangObject i : l) {
      {
        final OtpErlangTuple modLineT = ((OtpErlangTuple) i);
        OtpErlangObject _elementAt_1 = modLineT.elementAt(0);
        final String modName = Util.stringValue(_elementAt_1);
View Full Code Here


        int i = 0;
        for (final IErlModule module : scope.getModules()) {
            result[i] = make2Tuple(module.getScannerName(), module.getFilePath());
            i++;
        }
        return new OtpErlangList(result);
    }
View Full Code Here

    @Override
    public void startFindRefs(final ErlangSearchPattern pattern,
            final ErlSearchScope scope, final String stateDir,
            final IRpcResultCallback callback, final boolean updateSearchServer)
            throws RpcException {
        final OtpErlangList modules = getModulesFromScope(scope);
        backend.async_call_result(callback, "erlide_search_server", "start_find_refs",
                "xxxso", pattern.getSearchObject(), modules, stateDir, updateSearchServer);
    }
View Full Code Here

    @Override
    public OtpErlangObject findRefs(final ErlangSearchPattern pattern,
            final ErlSearchScope scope, final String stateDir,
            final boolean updateSearchServer) throws RpcException {
        final OtpErlangList modules = getModulesFromScope(scope);
        final OtpErlangObject searchObject = pattern.getSearchObject();
        ErlLogger.debug("searchObject %s", searchObject);
        final OtpErlangObject r = backend.call(SEARCH_LONG_TIMEOUT,
                "erlide_search_server", "find_refs", "xxso", searchObject, modules,
                stateDir, updateSearchServer);
View Full Code Here

                .findUnitsWithPrefix(prefix, project, kind != Kinds.INCLUDES, includes);
        final OtpErlangObject res = ErlangEngine.getInstance()
                .getService(OtpDocService.class)
                .getModules(backend, prefix, names, includes);
        if (res instanceof OtpErlangList) {
            final OtpErlangList resList = (OtpErlangList) res;
            for (final OtpErlangObject o : resList) {
                if (o instanceof OtpErlangString) {
                    final OtpErlangString s = (OtpErlangString) o;
                    final String suffix = includes ? "" : ":";
                    final String cpl = quoted(s.stringValue() + suffix, kind);
View Full Code Here

    void addFunctionProposalsWithDoc(final int offset, final String aprefix,
            final List<ICompletionProposal> result, final OtpErlangObject res,
            final IErlImport erlImport, final boolean arityOnly) {
        if (res instanceof OtpErlangList) {
            final OtpErlangList resl = (OtpErlangList) res;
            for (final OtpErlangObject i : resl) {
                // {FunWithArity, FunWithParameters, [{Offset, Length}], Doc}
                final OtpErlangTuple f = (OtpErlangTuple) i;
                final String funWithArity = ((OtpErlangString) f.elementAt(0))
                        .stringValue();
                if (!filterImported(erlImport, funWithArity)) {
                    continue;
                }
                String funWithParameters = arityOnly ? funWithArity
                        : ((OtpErlangString) f.elementAt(1)).stringValue();
                final OtpErlangList parOffsets = (OtpErlangList) f.elementAt(2);
                String docStr = null;
                if (f.arity() > 3) {
                    final OtpErlangObject elt = f.elementAt(3);
                    if (elt instanceof OtpErlangString) {
                        docStr = HTMLPrinter.asHtml(Util.stringValue(elt));
View Full Code Here

    public static List<String> formatWarnings(final IOtpRpc backend,
            final OtpErlangList warnings) {
        final List<String> result = Lists.newArrayList();
        try {
            final OtpErlangList l = (OtpErlangList) backend.call(ERLIDE_DIALYZE,
                    "format_warnings", "x", warnings);
            for (final OtpErlangObject o : l) {
                result.add(Util.stringValue(o).trim());
            }
        } catch (final RpcException e) {
View Full Code Here

        final String rootDir = _location.toPortableString();
        final Collection<IPath> srcDirs = props.getSourceDirs();
        final Collection<IPath> incDirs = props.getIncludeDirs();
        final IPath outDir = props.getOutputDir();
        IProject _workspaceProject_1 = project.getWorkspaceProject();
        final OtpErlangList opts = CompilerOptions.get(_workspaceProject_1);
        RuntimeVersion _requiredRuntimeVersion = props.getRequiredRuntimeVersion();
        final RuntimeVersion minOtpVsn = _requiredRuntimeVersion.asMajor();
        final Collection<String> libs = CollectionLiterals.<String>newArrayList();
        final Collection<String> libIncs = CollectionLiterals.<String>newArrayList();
        File _createTempDir = Files.createTempDir();
View Full Code Here

      try {
        String _name = Charsets.ISO_8859_1.name();
        final String src = Util.getInputStreamAsString(input, _name);
        try {
          final OtpErlangObject source0 = OtpErlang.parse(src);
          final OtpErlangList source = ((OtpErlangList) source0);
          OtpErlangObject[] _elements = source.elements();
          for (final OtpErlangObject item0 : _elements) {
            {
              final OtpErlangTuple item = ((OtpErlangTuple) item0);
              OtpErlangObject _elementAt = item.elementAt(0);
              final String tag = ((OtpErlangAtom) _elementAt).atomValue();
View Full Code Here

    private static final String ERLIDE_DEBUG = "erlide_debug";

    @SuppressWarnings("boxing")
    public static OtpErlangList getProcesses(final IOtpRpc backend,
            final boolean showSystemProcesses, final boolean showErlideProcesses) {
        OtpErlangList procs = null;
        try {
            procs = (OtpErlangList) BackendUtils.ok(backend.call(ERLIDE_DEBUG,
                    "processes", "oo", showSystemProcesses, showErlideProcesses));
        } catch (final RpcException e) {
            ErlLogger.warn(e);
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.