Search in sources :

Example 1 with ICodeBundle

use of org.erlide.backend.api.ICodeBundle in project erlide_eclipse by erlang.

the class Backend method initialize.

@Override
public void initialize(final CodeContext context, final Collection<ICodeBundle> bundles) {
    shellManager = new BackendShellManager(this);
    runtime.addRuntimeListener(new Listener() {

        @Override
        public void terminated(final Service.State from) {
            dispose();
            getData().setLaunch(null);
        }

        @Override
        public void failed(final State from, final Throwable failure) {
            dispose();
            getData().setLaunch(null);
        }

        @Override
        public void running() {
            codeManager = new CodeManager(getOtpRpc(), data.getRuntimeInfo().getName(), data.getRuntimeInfo().getVersion());
            for (final ICodeBundle bb : bundles) {
                registerCodeBundle(context, bb);
            }
            initErlang(data.isManaged());
            try {
                postLaunch();
            } catch (final DebugException e) {
                ErlLogger.error(e);
            }
        }
    }, MoreExecutors.sameThreadExecutor());
}
Also used : ICodeBundle(org.erlide.backend.api.ICodeBundle) BackendShellManager(org.erlide.backend.console.BackendShellManager) Listener(com.google.common.util.concurrent.Service.Listener) IDebugEventSetListener(org.eclipse.debug.core.IDebugEventSetListener) IStreamListener(org.eclipse.debug.core.IStreamListener) State(com.google.common.util.concurrent.Service.State) Service(com.google.common.util.concurrent.Service) DebugException(org.eclipse.debug.core.DebugException) State(com.google.common.util.concurrent.Service.State)

Example 2 with ICodeBundle

use of org.erlide.backend.api.ICodeBundle in project erlide_eclipse by erlang.

the class BackendManager method addBundle.

private void addBundle(final Bundle b, final RuntimeVersion version, final Multimap<CodeContext, String> paths, final Collection<Pair<String, String>> inits) {
    final ICodeBundle p = codeBundles.get(b);
    if (p != null) {
        return;
    }
    final CodeBundle pp = new CodeBundle(b, version, paths, inits);
    codeBundles.put(b, pp);
}
Also used : ICodeBundle(org.erlide.backend.api.ICodeBundle) ICodeBundle(org.erlide.backend.api.ICodeBundle)

Aggregations

ICodeBundle (org.erlide.backend.api.ICodeBundle)2 Service (com.google.common.util.concurrent.Service)1 Listener (com.google.common.util.concurrent.Service.Listener)1 State (com.google.common.util.concurrent.Service.State)1 DebugException (org.eclipse.debug.core.DebugException)1 IDebugEventSetListener (org.eclipse.debug.core.IDebugEventSetListener)1 IStreamListener (org.eclipse.debug.core.IStreamListener)1 BackendShellManager (org.erlide.backend.console.BackendShellManager)1