Chinaunix首页 | 论坛 | 博客
  • 博客访问: 685495
  • 博文数量: 845
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 5015
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-15 16:22
文章分类

全部博文(845)

文章存档

2011年(1)

2008年(844)

我的朋友

分类:

2008-10-15 16:36:10

//org.eclipse.ui.console


MessageConsoleStream console = this.openLogConsole("RCP",
"Informatiol",
"org.eclipse.workbench.ui.ide");
console.println(new Date(System.currentTimeMillis())
+ ":selected!");

public MessageConsoleStream openLogConsole(String domainName,
String stationId, String applicationId) {
System.err.println("openLogConsole(domain=" + domainName +
",
station="

+ stationId + ", app=" + applicationId + ")");
/*
* get console name and create a new console
*/

StringBuffer consoleName = new StringBuffer(domainName);
if (stationId != null) {
consoleName.append(">" + stationId);
if (applicationId != null) {
consoleName.append(">" + applicationId);
}
}

MessageConsole console = new
MessageConsole(consoleName.toString(),
null);
final MessageConsoleStream consoleStream =
console.newMessageStream();
consoleStream.setColor(Display.getDefault().getSystemColor(
SWT.COLOR_BLUE));
/*
* show view
*/

IConsoleManager manager = (IConsoleManager)
ConsolePlugin.getDefault()
.getConsoleManager();
manager
.addConsoles(new org.eclipse.ui.console.IConsole[] {
(org.eclipse.ui.console.IConsole) console });
manager.showConsoleView (console);
return consoleStream;
}

【责编:Chuan】

--------------------next---------------------

阅读(356) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~