use of org.eclipse.ui.console.ConsolePlugin in project tesb-studio-se by Talend.
the class RuntimeConsoleUtil method findConsole.
public static IOConsole findConsole() {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) {
if (KARAF_CONSOLE.equals(existing[i].getName()))
return (IOConsole) existing[i];
}
// no console found, so create a new one
IOConsole myConsole = new IOConsole(KARAF_CONSOLE, null);
conMan.addConsoles(new IConsole[] { myConsole });
return myConsole;
}
use of org.eclipse.ui.console.ConsolePlugin in project tesb-studio-se by Talend.
the class RuntimeConsoleUtil method clearConsole.
public static void clearConsole() {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) {
if (KARAF_CONSOLE.equals(existing[i].getName())) {
((IOConsole) existing[i]).destroy();
conMan.removeConsoles(new IConsole[] { existing[i] });
}
}
}
use of org.eclipse.ui.console.ConsolePlugin 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;
}
Aggregations