Search in sources :

Example 1 with IOtpNodeProxy

use of org.erlide.runtime.api.IOtpNodeProxy in project erlide_eclipse by erlang.

the class BackendFactory method createBackend.

@Override
public synchronized IBackend createBackend(final BackendData data) {
    ErlLogger.debug("Create backend " + data.getNodeName());
    final IBackend b;
    final IOtpNodeProxy runtime = createNodeProxy(data);
    final IBackendManager backendManager = BackendCore.getBackendManager();
    b = data.isInternal() ? new Backend(data, runtime, backendManager) : new ExternalBackend(data, runtime, backendManager);
    b.initialize(data.getContext(), backendManager.getCodeBundles());
    runtime.ensureRunning();
    return b;
}
Also used : IBackend(org.erlide.backend.api.IBackend) IBackendManager(org.erlide.backend.api.IBackendManager) IBackend(org.erlide.backend.api.IBackend) IOtpNodeProxy(org.erlide.runtime.api.IOtpNodeProxy)

Example 2 with IOtpNodeProxy

use of org.erlide.runtime.api.IOtpNodeProxy in project erlide_eclipse by erlang.

the class ErlangLaunchDelegate method launch.

@Override
public void launch(final ILaunchConfiguration config, final String mode, final ILaunch launch, final IProgressMonitor monitor) throws CoreException {
    final BackendData data = getBackendData(config, mode, launch);
    if (data == null) {
        return;
    }
    if (data.isManaged()) {
        setCaptureOutput(launch);
    }
    IOtpNodeProxy runtime;
    if (!ErlangLaunchDelegate.isErlangInternalLaunch(launch)) {
        backend = BackendCore.getBackendManager().createExecutionBackend(data);
        runtime = backend.getRuntime();
    } else {
        runtime = BackendCore.getBackendManager().getFactory().createNodeProxy(data);
    }
    if (data.isManaged()) {
        startErtsProcess(launch, data, runtime.getProcess());
    }
}
Also used : BackendData(org.erlide.backend.api.BackendData) IOtpNodeProxy(org.erlide.runtime.api.IOtpNodeProxy)

Aggregations

IOtpNodeProxy (org.erlide.runtime.api.IOtpNodeProxy)2 BackendData (org.erlide.backend.api.BackendData)1 IBackend (org.erlide.backend.api.IBackend)1 IBackendManager (org.erlide.backend.api.IBackendManager)1