Clearing a console: MessageConsole.clearConsole() problem. [message #320588] |
Mon, 24 September 2007 14:53 |
Eclipse User |
|
|
|
Originally posted by: brunodomedeiros+spam.com.gmail
I have this code (findConsole is taken from the Eclipse FAQ
http://wiki.eclipse.org/FAQ_How_do_I_write_to_the_console_fr om_a_plug-in_%3F):
String name = "foo";
MessageConsole myConsole = ConsoleUtil.findConsole(name);
myConsole.clearConsole();
MessageConsoleStream out = myConsole.newMessageStream();
out.println("Msg 1 ");
out.println("Msg 2 ");
try {
out.flush();
//out.close();
} catch (IOException e) {
throw ExceptionAdapter.unchecked(e);
}
However none of the messages are printed to the console. Seems
clearConsole() actually schedules a job (WTH?) to clear the console, so
the console is cleared *after* the messages are printed, which results
in an empty text.
So how can I do this correctly? And what's the reason for this
clearConsole() behavior?
--
Bruno Medeiros - MSc in CS/E student
|
|
|
Powered by
FUDForum. Page generated in 0.13479 seconds