use of org.erlide.runtime.runtimeinfo.RuntimeInfoCatalog in project erlide_eclipse by erlang.
the class OtpNodeProxyTest method prepareRuntime.
@Before
public void prepareRuntime() {
final RuntimeInfoCatalog cat = new RuntimeInfoCatalog();
cat.initializeRuntimesList();
assertThat(cat.getRuntimes()).isNotEmpty();
info = cat.getRuntimes().iterator().next();
assertThat(info).isNotEqualTo(RuntimeInfo.NO_RUNTIME_INFO);
HostnameChecker.getInstance().detectHostNames(info.getOtpHome());
final RuntimeData data = new RuntimeData(info, "run");
data.setNodeName("etest" + System.currentTimeMillis());
data.setLongName(false);
data.setCookie("c");
data.setManaged(true);
data.setRestartable(false);
runtime = new OtpNodeProxy(data);
runtime.ensureRunning();
process = runtime.getProcess();
assertThat(process).isNotNull();
}
use of org.erlide.runtime.runtimeinfo.RuntimeInfoCatalog in project erlide_eclipse by erlang.
the class RuntimeCore method getRuntimeInfoCatalog.
public static final synchronized IRuntimeInfoCatalog getRuntimeInfoCatalog(final IRuntimeInfoSerializer serializer) {
if (RuntimeCore.runtimeInfoCatalog == null) {
final RuntimeInfoCatalogData data = serializer.load();
RuntimeCore.runtimeInfoCatalog = new RuntimeInfoCatalog();
RuntimeCore.runtimeInfoCatalog.setRuntimes(data.runtimes, data.defaultRuntimeName, data.erlideRuntimeName);
final RuntimeInfo runtime = RuntimeCore.runtimeInfoCatalog.getErlideRuntime();
if (!HostnameChecker.getInstance().detectHostNames(runtime.getOtpHome())) {
// XXX show troubleshooting page and re-detect
ErlLogger.error("no matching hostnames found!! Edit ~/.erlide.hosts");
}
}
return RuntimeCore.runtimeInfoCatalog;
}
Aggregations