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;
}
Aggregations