(Eclipse RCP)如何将输出重定向到控制台视图? [英] (Eclipse RCP) How to redirect the output to Console View?

查看:285
本文介绍了(Eclipse RCP)如何将输出重定向到控制台视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个观众,一个有一个用于用户输入的文本,另一个是Eclipse的built_in控制台视图。并且我将根据用户的输入运行一个java程序,并希望在ConsoleView中显示日志信息。有没有人知道如何将输出重定向到控制台视图?



谢谢

解决方案

SO问题)


I have two viewers, one has a Text for user's input and the other viewer is the Eclipse's built_in Console View. And I will run an java program according user's input, and want to display the log information in the ConsoleView. Does anybody know How can I redirect the output to Console View ?

Thanks

解决方案

SO questions How to write a hyperlink to an eclipse console from a plugin and writing to the eclipse console give example of redirection to the Console.

The blog post Displaying the console in your RCP application

The ideas remain to create an OuputStream and open a New Console, or associating the MessageStream of a console to stdout adn stderr (like my previous answer)

这篇关于(Eclipse RCP)如何将输出重定向到控制台视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆