use of org.erlide.backend.api.IBackend in project erlide_eclipse by erlang.
the class BackendFactory method createIdeBackend.
@Override
public IBackend createIdeBackend() {
final BackendData data = getIdeBackendData();
ErlLogger.debug("Create ide backend " + data.getRuntimeInfo().getVersion());
final IBackend backend = createBackend(data);
return backend;
}
use of org.erlide.backend.api.IBackend 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;
}
use of org.erlide.backend.api.IBackend in project erlide_eclipse by erlang.
the class BackendManager method getByVersion.
@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();
for (final IBackend b : list) {
if (b.getRuntime().getVersion().equals(version)) {
return b.getOtpRpc();
}
}
for (final IBackend b : list) {
if (b.getRuntime().getVersion().isCompatible(version)) {
return b.getOtpRpc();
}
}
return null;
}
use of org.erlide.backend.api.IBackend in project erlide_eclipse by erlang.
the class BackendManager method getIdeBackend.
@SuppressWarnings("null")
@Override
public synchronized IBackend getIdeBackend() {
if (ideBackend == null) {
final IBackend result = factory.createIdeBackend();
addBackend(result);
notifyBackendChange(result, BackendEvent.ADDED, null, null);
ideBackend = result;
}
return ideBackend;
}
use of org.erlide.backend.api.IBackend in project erlide_eclipse by erlang.
the class BackendManager method createExecutionBackend.
@Override
public IBackend createExecutionBackend(final BackendData data) {
ErlLogger.debug("create execution backend " + data.getNodeName());
@NonNull final IBackend b = factory.createBackend(data);
addBackend(b);
notifyBackendChange(b, BackendEvent.ADDED, null, null);
return b;
}
Aggregations