私は答えに遅れるかもしれませんが、これが私が何とかしたことです(そしてそれは私のために働きました):
このチュートリアルhttp://wiki.eclipse.org/FAQ_How_do_I_write_to_the_console_from_a_plug-in%3Fに基づいてコンソールを作成し、findConsoleメソッドを次のように変更しました。
private MessageConsole findConsole(String name) {
ConsolePlugin plugin = ConsolePlugin.getDefault();
IConsoleManager conMan = plugin.getConsoleManager();
IConsole[] existing = conMan.getConsoles();
//if console exists, clear it
for (int i = 0; i < existing.length; i++)
if (name.equals(existing[i].getName())){
((MessageConsole) existing[i]).clearConsole(); //this is the important part
return myConsole;
}
myConsole = new MessageConsole(name, null);
conMan.addConsoles(new IConsole[]{myConsole});
return myConsole;
}
だから、他のボタン/コントロール/何でものリスナーで、私は持っています:
myConsole = findConsole(ASIO_RECORD_OUTPUT);
myConsoleOut = myConsole.newMessageStream();
そして、そのコードが実行されるたびに、私のコンソールはクリアされます。それが役に立てば幸い。
編集:言及するのを忘れました、私はRCPアプリケーションを作成するときにこれをしました!