Search in sources :

Example 1 with ErlConsoleManager

use of org.erlide.ui.console.ErlConsoleManager in project erlide_eclipse by erlang.

the class SendToConsoleAction method getConsole.

private IErlangConsole getConsole(@NonNull final IProject aproject) {
    final IBackendManager backendManager = BackendCore.getBackendManager();
    final Set<IBackend> executionBackends = backendManager.getExecutionBackends(aproject);
    final ErlConsoleManager erlConsoleManager = ErlideUIPlugin.getDefault().getErlConsoleManager();
    IErlangConsole result = null;
    for (final IBackend backend : executionBackends) {
        result = erlConsoleManager.getConsole(backend);
        if (result != null) {
            break;
        }
    }
    return result;
}
Also used : IBackendManager(org.erlide.backend.api.IBackendManager) IBackend(org.erlide.backend.api.IBackend) IErlangConsole(org.erlide.ui.console.IErlangConsole) ErlConsoleManager(org.erlide.ui.console.ErlConsoleManager)

Example 2 with ErlConsoleManager

use of org.erlide.ui.console.ErlConsoleManager in project erlide_eclipse by erlang.

the class ErlideUIPlugin method start.

@Override
public void start(final BundleContext context) throws Exception {
    ErlLogger.info("Starting UI " + Thread.currentThread());
    super.start(context);
    final String workspace = ResourcesPlugin.getWorkspace().getRoot().getLocation().toPortableString();
    if (!ErlangEngine.getInstance().isAvailable()) {
        notifyNoRuntimeAndRestart(workspace);
    } else if (HostnameChecker.getInstance().getErlangHostName(true) == null && HostnameChecker.getInstance().getErlangHostName(false) == null) {
        notifyBadHostname(workspace);
    }
    ErlideEventBus.register(new NoRuntimeHandler());
    ErlideEventBus.register(new UIMessageReporter());
    if (SystemConfiguration.getInstance().isDeveloper()) {
        BackendManagerPopup.init();
    }
    ErlLogger.info("Started UI");
    erlConsoleManager = new ErlConsoleManager();
    ConsolePlugin.getDefault().getConsoleManager().addConsoleListener(erlConsoleManager);
    erlangDebuggerBackendListener = new ErlangDebuggerBackendListener();
    BackendCore.getBackendManager().addBackendListener(erlangDebuggerBackendListener);
    startPeriodicCacheCleaner();
    checkNavigatorView();
}
Also used : UIMessageReporter(org.erlide.ui.UIMessageReporter) ErlangDebuggerBackendListener(org.erlide.debug.ui.model.ErlangDebuggerBackendListener) NoRuntimeHandler(org.erlide.ui.util.NoRuntimeHandler) ErlConsoleManager(org.erlide.ui.console.ErlConsoleManager)

Aggregations

ErlConsoleManager (org.erlide.ui.console.ErlConsoleManager)2 IBackend (org.erlide.backend.api.IBackend)1 IBackendManager (org.erlide.backend.api.IBackendManager)1 ErlangDebuggerBackendListener (org.erlide.debug.ui.model.ErlangDebuggerBackendListener)1 UIMessageReporter (org.erlide.ui.UIMessageReporter)1 IErlangConsole (org.erlide.ui.console.IErlangConsole)1 NoRuntimeHandler (org.erlide.ui.util.NoRuntimeHandler)1