java

位置:IT落伍者 >> java >> 浏览文章

实现向eclipse控制台输入消息


发布日期:2023年02月10日
 
实现向eclipse控制台输入消息

//orgeclipseuiconsole

MessageConsoleStream console = thisopenLogConsole(RCP

Informatiol

orgeclipseworkbenchuiide);

consoleprintln(new Date(SystemcurrentTimeMillis())

+ :selected!);

public MessageConsoleStream openLogConsole(String domainName

String stationId String applicationId) {

Systemerrprintln(openLogConsole(domain= + domainName +

station=

+ stationId + app= + applicationId + ));

/*

* get console name and create a new console

*/

StringBuffer consoleName = new StringBuffer(domainName);

if (stationId != null) {

consoleNameappend(> + stationId);

if (applicationId != null) {

consoleNameappend(> + applicationId);

}

}

MessageConsole console = new

MessageConsole(consoleNametoString()

null);

final MessageConsoleStream consoleStream =

consolenewMessageStream();

consoleStreamsetColor(DisplaygetDefault()getSystemColor(

SWTCOLOR_BLUE));

/*

* show view

*/

IConsoleManager manager = (IConsoleManager)

ConsolePlugingetDefault()

getConsoleManager();

manager

addConsoles(new orgeclipseuiconsoleIConsole[] {

(orgeclipseuiconsoleIConsole) console });

managershowConsoleView (console);

return consoleStream;

}

               

上一篇:Struts从零开始四、Struts中的国际化[2]

下一篇:谈谈对struts多模块的认识