Search in sources :

Example 26 with IConsole

use of org.eclipse.ui.console.IConsole in project erlide_eclipse by erlang.

the class ErlConsoleManager method runtimeRemoved.

@Override
public void runtimeRemoved(final IBackend b) {
    ErlLogger.debug("console REMOVED from " + b.getName());
    final IConsole console = consoles.get(b);
    if (console == null) {
        return;
    }
    conMan.removeConsoles(new IConsole[] { console });
}
Also used : IConsole(org.eclipse.ui.console.IConsole)

Example 27 with IConsole

use of org.eclipse.ui.console.IConsole in project linuxtools by eclipse.

the class BuildConsole method findConsole.

/**
 * Returns a reference to this {@link BuildConsole}. If the console does not
 * yet exist, it is created.
 *
 * @return An existing or newly created instance of {@link BuildConsole}.
 */
public static BuildConsole findConsole() {
    for (IConsole console : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
        if (console instanceof BuildConsole) {
            return (BuildConsole) console;
        }
    }
    // no existing console, create new one
    final BuildConsole console = new BuildConsole();
    ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[] { console });
    return console;
}
Also used : IConsole(org.eclipse.ui.console.IConsole)

Example 28 with IConsole

use of org.eclipse.ui.console.IConsole in project linuxtools by eclipse.

the class ScriptConsole method anyRunning.

/**
 * This method will check to see if any scripts are currently running.
 * @return boolean indicating whether any scripts are running.
 * @since 2.0
 */
public static boolean anyRunning() {
    IConsole[] ic = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
    ScriptConsole console;
    for (IConsole con : ic) {
        if (con instanceof ScriptConsole) {
            console = (ScriptConsole) con;
            if (console.isRunning()) {
                return true;
            }
        }
    }
    return false;
}
Also used : IConsole(org.eclipse.ui.console.IConsole)

Example 29 with IConsole

use of org.eclipse.ui.console.IConsole in project linuxtools by eclipse.

the class ScriptConsole method stopAll.

/**
 * This method will stop all consoles that are running.
 * @since 2.0
 */
public static void stopAll() {
    IConsole[] ic = ConsolePlugin.getDefault().getConsoleManager().getConsoles();
    ScriptConsole console;
    for (IConsole con : ic) {
        if (con instanceof ScriptConsole) {
            console = (ScriptConsole) con;
            console.stop();
        }
    }
}
Also used : IConsole(org.eclipse.ui.console.IConsole)

Example 30 with IConsole

use of org.eclipse.ui.console.IConsole in project linuxtools by eclipse.

the class CreaterepoUtils method findConsole.

/**
 * Find the console to be used, and if none found, create
 * a new console to use.
 *
 * @param name The name of the console.
 * @return The found console or a new one if none found.
 */
public static MessageConsole findConsole(String name) {
    ConsolePlugin plugin = ConsolePlugin.getDefault();
    IConsoleManager manager = plugin.getConsoleManager();
    MessageConsole console = null;
    for (IConsole cons : ConsolePlugin.getDefault().getConsoleManager().getConsoles()) {
        if (cons.getName().equals(name)) {
            console = (MessageConsole) cons;
        }
    }
    // no existing console, create new one
    if (console == null) {
        console = new MessageConsole(name, null, null, true);
    }
    manager.addConsoles(new IConsole[] { console });
    console.clearConsole();
    console.activate();
    return console;
}
Also used : IConsoleManager(org.eclipse.ui.console.IConsoleManager) MessageConsole(org.eclipse.ui.console.MessageConsole) ConsolePlugin(org.eclipse.ui.console.ConsolePlugin) IConsole(org.eclipse.ui.console.IConsole)

Aggregations

IConsole (org.eclipse.ui.console.IConsole)50 IConsoleManager (org.eclipse.ui.console.IConsoleManager)32 ConsolePlugin (org.eclipse.ui.console.ConsolePlugin)28 MessageConsole (org.eclipse.ui.console.MessageConsole)22 IOConsole (org.eclipse.ui.console.IOConsole)6 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)4 PartInitException (org.eclipse.ui.PartInitException)4 IOException (java.io.IOException)3 CoreException (org.eclipse.core.runtime.CoreException)3 IProcess (org.eclipse.debug.core.model.IProcess)3 IConsoleView (org.eclipse.ui.console.IConsoleView)3 TextConsole (org.eclipse.ui.console.TextConsole)3 ArrayList (java.util.ArrayList)2 Matcher (java.util.regex.Matcher)2 Pattern (java.util.regex.Pattern)2 IProcessTerminationListener (net.vtst.eclipse.easyxtext.ui.launching.EasyLaunchConfigurationDelegateUtils.IProcessTerminationListener)2 EasyPatternMatchListener (net.vtst.eclipse.easyxtext.ui.launching.EasyPatternMatchListener)2 IMarker (org.eclipse.core.resources.IMarker)2 BadLocationException (org.eclipse.jface.text.BadLocationException)2 IOConsoleOutputStream (org.eclipse.ui.console.IOConsoleOutputStream)2