Search in sources :

Example 1 with ConsoleView

use of org.eclipse.ui.internal.console.ConsoleView 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();
}
Also used : IViewPart(org.eclipse.ui.IViewPart) ConsoleView(org.eclipse.ui.internal.console.ConsoleView) ProcessConsole(org.eclipse.debug.internal.ui.views.console.ProcessConsole) IConsole(org.eclipse.ui.console.IConsole)

Aggregations

ProcessConsole (org.eclipse.debug.internal.ui.views.console.ProcessConsole)1 IViewPart (org.eclipse.ui.IViewPart)1 IConsole (org.eclipse.ui.console.IConsole)1 ConsoleView (org.eclipse.ui.internal.console.ConsoleView)1