use of org.eclipse.ui.console.IConsole in project n4js by eclipse.
the class GHOLD_45_CheckIgnoreAnnotationAtClassLevel_PluginUITest method getConsoleContent.
private String getConsoleContent() {
waitForIdleState();
final IViewPart viewPart = showView(CONSOLE_VIEW_ID);
final ConsoleView consoleView = assertInstanceOf(viewPart, ConsoleView.class);
final IConsole console = consoleView.getConsole();
// Can be null, if nothing was logged to the console yet. Such cases return with empty string instead.
if (console == null) {
return "";
}
final ProcessConsole processConsole = assertInstanceOf(console, ProcessConsole.class);
return processConsole.getDocument().get();
}
use of org.eclipse.ui.console.IConsole in project usbdm-eclipse-plugins by podonoghue.
the class MyConsoleInterface method getConsole.
/**
* Locates TTY console for given port number. Creates one if necessary
*
* @return console found
*/
public static UsbdmTtyConsole getConsole(int ttyPortNum) {
String consoleName = String.format(CONSOLE_NAME, ttyPortNum);
UsbdmTtyConsole console = null;
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) {
if (existing[i].getName().equals(consoleName)) {
console = (UsbdmTtyConsole) existing[i];
console.activate();
return console;
}
}
// No console found, so create a new one
console = new UsbdmTtyConsole(consoleName, null, ttyPortNum);
conMan.addConsoles(new IConsole[] { console });
return console;
}
use of org.eclipse.ui.console.IConsole in project statecharts by Yakindu.
the class EclipseConsoleLogger method getConsole.
private MessageConsole getConsole() {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) {
if (SCT_GENERATOR_CONSOLE.equals(existing[i].getName())) {
return (MessageConsole) existing[i];
}
}
MessageConsole myConsole = new MessageConsole(SCT_GENERATOR_CONSOLE, null);
conMan.addConsoles(new IConsole[] { myConsole });
return myConsole;
}
use of org.eclipse.ui.console.IConsole in project statecharts by Yakindu.
the class StatechartLaunchShortcut method showConsole.
protected void showConsole() {
IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
IConsole[] consoles = consoleManager.getConsoles();
for (IConsole iConsole : consoles) {
if (TYPE.equals(iConsole.getType())) {
if (iConsole instanceof IOConsole) {
((IOConsole) iConsole).activate();
consoleManager.showConsoleView(iConsole);
}
}
}
}
use of org.eclipse.ui.console.IConsole in project titan.EclipsePlug-ins by eclipse.
the class AstRunnerJava method findConsole.
private static MessageConsole findConsole(String name) {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.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 myConsole = new MessageConsole(name, null);
conMan.addConsoles(new IConsole[] { myConsole });
return myConsole;
}
Aggregations