Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Clearing a console: MessageConsole.clearConsole() problem.
Clearing a console: MessageConsole.clearConsole() problem. [message #320588] Mon, 24 September 2007 14:53
Eclipse UserFriend
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
Previous Topic:Missing resource change event
Next Topic:JDT code-completion for external jar in non java project
Goto Forum:
  


Current Time: Thu Jul 24 08:04:24 EDT 2025

Powered by FUDForum. Page generated in 0.13479 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top