I'm opening a console using this code:
MessageConsole console=new MessageConsole("Console", null);
ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{console});
ConsolePlugin.getDefault().getConsoleManager().showConsoleView(console);
My question is: How can i CLOSE the console View??
The problem: I was expecting a ConsolePlugin.getDefault().getConsoleManager().closeConsoleView(...), that does not exist. Inspecting further, i found:
void org.eclipse.ui.console.IConsoleManager.removeConsoles(IConsole[] consoles)
Removes the given consoles from the console manager. If the consoles are being displayed in any console views, the associated pages will be removed and disposed.
Well, this is not true. This is the exact code present in http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fui%2Fconsole%2Factions%2FCloseConsoleAction.html, but it does NOT close the console view! (to be exact, in this doc it only says: Removes a console from the console manager)
Thanks.