use of org.eclipse.ui.console.IConsoleView in project azure-tools-for-java by Microsoft.
the class ConsoleLogger method showConsole.
private void showConsole() {
DefaultLoader.getIdeHelper().invokeAndWait(() -> {
IConsole myConsole = this.console;
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
IWorkbenchPage page = window.getActivePage();
if (page != null) {
String id = IConsoleConstants.ID_CONSOLE_VIEW;
IConsoleView view;
try {
view = (IConsoleView) page.showView(id);
view.display(myConsole);
} catch (PartInitException e) {
e.printStackTrace();
}
}
}
});
}
use of org.eclipse.ui.console.IConsoleView in project ch.hsr.ifs.cdttesting by IFS-HSR.
the class Console method revealConsole.
private static void revealConsole() {
IConsole myConsole = findConsole(name);
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
String id = IConsoleConstants.ID_CONSOLE_VIEW;
IConsoleView view;
try {
view = (IConsoleView) page.showView(id);
view.display(myConsole);
} catch (PartInitException e) {
return;
}
}
use of org.eclipse.ui.console.IConsoleView in project mdw-designer by CenturyLinkCloud.
the class WorkflowLaunchConfiguration method writeToConsole.
protected void writeToConsole(String name, String toWrite) throws IOException {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMgr = plugin.getConsoleManager();
IConsole[] existing = conMgr.getConsoles();
for (int i = 0; i < existing.length; i++) {
if (name.equals(existing[i].getName()))
console = (org.eclipse.ui.console.MessageConsole) existing[i];
}
if (console == null) {
console = new org.eclipse.ui.console.MessageConsole(name, MdwPlugin.getImageDescriptor("icons/extevent.gif"));
conMgr.addConsoles(new IConsole[] { console });
}
console.newMessageStream().write(toWrite);
MdwPlugin.getDisplay().asyncExec(new Runnable() {
public void run() {
IWorkbenchPage page = MdwPlugin.getActivePage();
if (page != null) {
try {
IConsoleView view = (IConsoleView) page.showView(IConsoleConstants.ID_CONSOLE_VIEW);
if (view != null)
view.display(console);
} catch (PartInitException ex) {
PluginMessages.log(ex);
}
}
}
});
}
Aggregations