|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.gmf.runtime.common.ui.util.ConsoleUtil
A Util Class: provides convinient api to write to the Eclipse Console View The client of printXXXX(String name, String msg) methods does not need to do any housekeeping work to use this method. All pre-work for example registering the console with the Eclipse console manager if neccessary, creating the message stream, setting the default color are handled ny the method if neccesary. However once they are done printing all there messages and have no more requirement for the console and know that the console is not shared by others they can call unregisterConsole(String name) to dispose of the console Also if the client wants to have more control over the console and streams or want to display addititional message types in different colors (other than error:red, info:blue and warning:yellow) they can call registerConsole(String name, ImageDescriptor image) to create/register/get the console and then use standard eclipse api to do what they want.
| Field Summary | |
static Color |
DEFAULT_ERROR
Default color used for logging error messages to the console. |
static Color |
DEFAULT_INFO
Default color used for logging info messages to the console. |
static Color |
DEFAULT_WARNING
Default color used for logging warning messages to the console. |
| Constructor Summary | |
ConsoleUtil()
|
|
| Method Summary | |
static void |
printError(java.lang.String name,
java.lang.String errMsg)
Convinient static method to print an error string on the specified console. |
static void |
printInfo(java.lang.String name,
java.lang.String infoMsg)
Convinient static method to print an info string on the specified console. |
static void |
println(java.lang.String name,
java.lang.String msg)
Convinient static method to print an string on the specified console. |
static void |
printWarning(java.lang.String name,
java.lang.String warnMsg)
Convinient static method to print an warning string on the specified console. |
static MessageConsole |
registerConsole(java.lang.String name)
Registers the console with the Eclipse Console Manager |
static MessageConsole |
registerConsole(java.lang.String name,
ImageDescriptor image)
Registers the console with the Eclipse Console Manager. |
static void |
showConsole(java.lang.String name)
Shows the Eclipse console view and brings on top the specified console. |
static void |
unregisterConsole(java.lang.String name)
Unregisters the console with the Eclipse Console Manager |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final Color DEFAULT_ERROR
public static final Color DEFAULT_INFO
public static final Color DEFAULT_WARNING
| Constructor Detail |
public ConsoleUtil()
| Method Detail |
public static MessageConsole registerConsole(java.lang.String name,
ImageDescriptor image)
name - - the name for the consoleimage - - the image associated with the console
public static MessageConsole registerConsole(java.lang.String name)
name - - the name name for the console
public static void unregisterConsole(java.lang.String name)
name - - the name name for the console
public static void printError(java.lang.String name,
java.lang.String errMsg)
name - - specifies the consoleerrMsg - - the error message
public static void printInfo(java.lang.String name,
java.lang.String infoMsg)
name - - specifies the consoleinfoMsg - - the info message
public static void printWarning(java.lang.String name,
java.lang.String warnMsg)
name - - specifies the consolewarnMsg - - the warning message
public static void println(java.lang.String name,
java.lang.String msg)
name - - specifies the consolemsg - - the warning messagepublic static void showConsole(java.lang.String name)
name - - specifies the console
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.