use of org.eclipse.ui.console.IConsole in project abstools by abstools.
the class SDAction method findConsole.
private MessageConsole findConsole() {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) {
// System.out.println("Console \"" + existing[i].getName() + "\" found");
if (ID_CONSOLE_VIEW.equals(existing[i].getName()))
return (MessageConsole) existing[i];
}
// no console found, so create a new one
MessageConsole myConsole = new MessageConsole(ID_CONSOLE_VIEW, null);
conMan.addConsoles(new IConsole[] { myConsole });
return myConsole;
}
use of org.eclipse.ui.console.IConsole in project abstools by abstools.
the class ConsoleHandler method findCostabsConsole.
public static MessageConsole findCostabsConsole() {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) if (ID_CONSOLE_VIEW.equals(existing[i].getName()))
return (MessageConsole) existing[i];
// no console found, so create a new one
MessageConsole myConsole = new MessageConsole(ID_CONSOLE_VIEW, null);
conMan.addConsoles(new IConsole[] { myConsole });
return myConsole;
}
use of org.eclipse.ui.console.IConsole in project liferay-ide by liferay.
the class UITestsUtils method getConsole.
public static IConsole getConsole(String name) {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) if ((existing[i].getName()).contains(name))
return existing[i];
return null;
}
use of org.eclipse.ui.console.IConsole in project liferay-ide by liferay.
the class CompileAction method getConsole.
public static IConsole getConsole(String name) {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) {
if ((existing[i].getName()).contains(name)) {
return existing[i];
}
}
return null;
}
use of org.eclipse.ui.console.IConsole in project n4js by eclipse.
the class EclipseUtils method getOrCreateConsole.
/**
* Get or create the console with the given name in the console view.
*/
public static MessageConsole getOrCreateConsole(String name, boolean create, boolean reveal) {
MessageConsole result = null;
final ConsolePlugin plugin = ConsolePlugin.getDefault();
final IConsoleManager mgr = plugin.getConsoleManager();
final IConsole[] consoles = mgr.getConsoles();
for (int i = 0; i < consoles.length; i++) {
final IConsole currConsole = consoles[i];
if (currConsole instanceof MessageConsole && name.equals(currConsole.getName())) {
result = (MessageConsole) currConsole;
break;
}
}
if (result == null && create) {
final MessageConsole newConsole = new MessageConsole(name, null);
mgr.addConsoles(new IConsole[] { newConsole });
result = newConsole;
}
if (result != null && reveal) {
revealConsole(result);
}
return result;
}
Aggregations