use of org.eclipse.ui.console.IConsole in project titan.EclipsePlug-ins by eclipse.
the class AstWalkerJava 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;
}
use of org.eclipse.ui.console.IConsole in project soot by Sable.
the class SootPlugin method findConsole.
private 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;
}
use of org.eclipse.ui.console.IConsole 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.IConsole in project azure-tools-for-java by Microsoft.
the class ConsoleLogger method findConsole.
private MessageConsole findConsole(String name) {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
for (int i = 0; i < existing.length; i++) {
System.out.println(existing[i].getType());
if (name.equals(existing[i].getName()) && existing[i] instanceof MessageConsole) {
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;
}
use of org.eclipse.ui.console.IConsole in project erlide_eclipse by erlang.
the class ConsoleRemoveLaunchAction method getLaunch.
protected ILaunch getLaunch() {
if (fConsoleView == null) {
return fLaunch;
}
// else get dynamically, as this action was created via plug-in XML view
// contribution
final IConsole console = fConsoleView.getConsole();
if (console instanceof ErlangConsole) {
final ErlangConsole pconsole = (ErlangConsole) console;
final IBackend backend = pconsole.getBackend();
return backend.getData().getLaunch();
}
return null;
}
Aggregations