Package org.erlide.runtime.runtimeinfo

Examples of org.erlide.runtime.runtimeinfo.RuntimeInfo


        }
    }

    @Override
    public IBackend getBuildBackend(@NonNull final IErlProject project) {
        final RuntimeInfo info = project.getRuntimeInfo();
        if (info == null) {
            ErlLogger
                    .info("Project %s has no runtime info, using ide", project.getName());
            return getIdeBackend();
        }
        final String version = info.getVersion().asMajor().toString();
        IBackend b = buildBackends.get(version);
        if (b == null) {
            b = factory.createBuildBackend(info);
            buildBackends.put(version, b);
            addBackend(b);
View Full Code Here


        return null;
    }

    @Override
    public IOtpRpc getByVersion(final RuntimeVersion version) {
        final RuntimeInfo info = BackendCore.getRuntimeInfoCatalog().getRuntime(version,
                null);
        if (info == null) {
            return null;
        }
        final Collection<IBackend> list = getAllBackends();
View Full Code Here

            final String mode, final ILaunch launch) throws CoreException {
        if (config == null) {
            throw new IllegalArgumentException();
        }

        RuntimeInfo runtimeInfo = BackendCore.getRuntimeInfoCatalog().getRuntime(
                config.getAttribute(ErlRuntimeAttributes.RUNTIME_NAME, ""));
        if (runtimeInfo == null) {
            runtimeInfo = BackendCore.getRuntimeInfoCatalog().getDefaultRuntime();
        }
        if (runtimeInfo == null) {
View Full Code Here

        if (containers.isEmpty()) {
            containers.add(new WorkspaceSourceContainer());
        }
        final String runtimeName = configuration.getAttribute(
                ErlRuntimeAttributes.RUNTIME_NAME, "").trim();
        final RuntimeInfo info = BackendCore.getRuntimeInfoCatalog().getRuntime(
                runtimeName);
        containers.add(new ErlangOtpSourceContainer(new Path(info.getOtpHome())));
        return containers.toArray(new ISourceContainer[containers.size()]);
    }
View Full Code Here

        node.put(ARGS, info.getArgs());
    }

    public static RuntimeInfo load(final Preferences node) {
        final String path = node.get(CODE_PATH, "");
        final RuntimeInfo info = new RuntimeInfo(node.name(), node.get(HOME_DIR, ""),
                node.get(ARGS, ""), PreferencesUtils.unpackList(path));
        return info;
    }
View Full Code Here

        String[] children;
        final Collection<RuntimeInfo> runtimes = new ArrayList<RuntimeInfo>(data.runtimes);
        try {
            children = root.childrenNames();
            for (final String name : children) {
                final RuntimeInfo rt = RuntimeInfoLoader.load(root.node(name));
                runtimes.add(rt);
            }
        } catch (final BackingStoreException e) {
            ErlLogger.warn(e);
        }
View Full Code Here

        return b;
    }

    private BackendData getIdeBackendData() {
        final RuntimeInfo info = getIdeRuntimeInfo();
        final BackendData result = new BackendData(info);
        result.setNodeName(getIdeNodeName());
        result.setDebug(false);
        result.setConsole(SystemConfiguration.getInstance().isDeveloper());
        result.setManaged(true);
View Full Code Here

        result.setContext(CodeContext.IDE);
        return result;
    }

    private BackendData getBuildBackendData(final @NonNull RuntimeInfo info) {
        final RuntimeInfo myinfo = new RuntimeInfo(info);

        final BackendData result = new BackendData(myinfo);
        result.setNodeName(info.getVersion().asMajor().toString() + "_"
                + BackendUtils.getErlideNodeNameTag());
        result.setCookie("erlide");
View Full Code Here

        final ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
        final ILaunchConfigurationType type = manager
                .getLaunchConfigurationType(IErlangLaunchDelegateConstants.CONFIGURATION_TYPE_INTERNAL);
        ILaunchConfigurationWorkingCopy workingCopy;
        try {
            final RuntimeInfo info = getRuntimeInfo();
            final String name = getNodeName();
            workingCopy = type.newInstance(null, name);
            if (info.getVersion().isReleaseCompatible(new RuntimeVersion(17))) {
                workingCopy.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING,
                        Charsets.UTF_8.name());
            } else {
                workingCopy.setAttribute(DebugPlugin.ATTR_CONSOLE_ENCODING,
                        Charsets.ISO_8859_1.name());
            }

            workingCopy.setAttribute(DebugPlugin.ATTR_PROCESS_FACTORY_ID,
                    "org.erlide.backend.ertsProcessFactory");

            workingCopy.setAttribute(ErlRuntimeAttributes.NODE_NAME, getNodeName());
            workingCopy.setAttribute(ErlRuntimeAttributes.RUNTIME_NAME, info.getName());
            workingCopy.setAttribute(ErlRuntimeAttributes.COOKIE, getCookie());
            // workingCopy.setAttribute(ErlLaunchAttributes.CONSOLE,
            // !options.contains(BackendOptions.NO_CONSOLE));
            workingCopy.setAttribute(ErlRuntimeAttributes.USE_LONG_NAME, hasLongName());
            workingCopy.setAttribute(ErlRuntimeAttributes.INTERNAL, isInternal());
View Full Code Here

        result.setContext(CodeContext.IDE);
        return result;
    }

    private RuntimeInfo getIdeRuntimeInfo() {
        final RuntimeInfo runtime = runtimeInfoCatalog.getErlideRuntime();
        if (runtime != null && runtimeHomeDirExists(runtime)) {
            return new RuntimeInfo(runtime);
        }
        for (final RuntimeInfo aruntime : runtimeInfoCatalog.getRuntimes()) {
            if (aruntime != null && runtimeHomeDirExists(aruntime)) {
                return new RuntimeInfo(aruntime);
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.erlide.runtime.runtimeinfo.RuntimeInfo

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.