Search in sources :

Example 6 with IConsole

use of org.eclipse.ui.console.IConsole in project azure-tools-for-java by Microsoft.

the class Activator method findConsole.

public static MessageConsole findConsole(String name) {
    ConsolePlugin consolePlugin = ConsolePlugin.getDefault();
    IConsoleManager conMan = consolePlugin.getConsoleManager();
    IConsole[] existing = conMan.getConsoles();
    for (int i = 0; i < existing.length; i++) {
        if (name.equals(existing[i].getName()))
            return (MessageConsole) existing[i];
    }
    // no console found, so create a new one
    MessageConsole messageConsole = new MessageConsole(name, null);
    conMan.addConsoles(new IConsole[] { messageConsole });
    return messageConsole;
}
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)6 IConsoleManager (org.eclipse.ui.console.IConsoleManager)4 IOConsole (org.eclipse.ui.console.IOConsole)4 ConsolePlugin (org.eclipse.ui.console.ConsolePlugin)3 IOException (java.io.IOException)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 CoreException (org.eclipse.core.runtime.CoreException)2 IProcess (org.eclipse.debug.core.model.IProcess)2 BadLocationException (org.eclipse.jface.text.BadLocationException)2 IOConsoleOutputStream (org.eclipse.ui.console.IOConsoleOutputStream)2 MessageConsole (org.eclipse.ui.console.MessageConsole)2 PatternMatchEvent (org.eclipse.ui.console.PatternMatchEvent)2 TextConsole (org.eclipse.ui.console.TextConsole)2 Iterator (java.util.Iterator)1 IFile (org.eclipse.core.resources.IFile)1 FileLink (org.eclipse.debug.ui.console.FileLink)1