org.jmlspecs.eclipse.jdt.ui
Class Console

java.lang.Object
  extended by org.jmlspecs.eclipse.jdt.internal.compiler.util.Log
      extended by org.jmlspecs.eclipse.jdt.ui.Console

public class Console
extends Log


Nested Class Summary
static class Console.StreamToConsole
          This class is an OutputStream that, when written to, writes the data to the Eclipse Console supplied in the constructor.
 
Field Summary
 
Fields inherited from class org.jmlspecs.eclipse.jdt.internal.compiler.util.Log
log, on
 
Method Summary
 java.io.PrintStream consolePrintStream()
          Creates a PrintStream that, when written to, writes to the Eclipse Console of the current log object
static void createLog(java.lang.String consoleName, org.eclipse.core.runtime.Plugin plugin)
          Creates a Console Log and sets the current log object
 org.eclipse.ui.console.MessageConsoleStream getConsoleStream()
          Creates, if necessary, and returns an instance of the stream to use to write to the console
 void ierrorlog(java.lang.String msg, java.lang.Throwable e)
          Records an error message
 void ilog(java.lang.String msg)
          Records an informational message
static java.io.PrintStream logPrintStream()
          Creates a PrintStream that, when written to, writes to the Eclipse Console of the current log object
 
Methods inherited from class org.jmlspecs.eclipse.jdt.internal.compiler.util.Log
errorlog, initializeState, log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createLog

public static void createLog(java.lang.String consoleName,
                             org.eclipse.core.runtime.Plugin plugin)
Creates a Console Log and sets the current log object

Parameters:
consoleName - The name of the console to be logged to
plugin - The plugin object using this log

logPrintStream

public static java.io.PrintStream logPrintStream()
Creates a PrintStream that, when written to, writes to the Eclipse Console of the current log object

Returns:
a PrintStream connected to the Eclipse Console

getConsoleStream

public org.eclipse.ui.console.MessageConsoleStream getConsoleStream()
Creates, if necessary, and returns an instance of the stream to use to write to the console

Returns:
The stream value to use

ilog

public void ilog(java.lang.String msg)
Records an informational message

Overrides:
ilog in class Log
Parameters:
msg - The message to log

ierrorlog

public void ierrorlog(java.lang.String msg,
                      java.lang.Throwable e)
Records an error message

Overrides:
ierrorlog in class Log
Parameters:
msg - The message to log
e - An associated exception (may be null)

consolePrintStream

public java.io.PrintStream consolePrintStream()
Creates a PrintStream that, when written to, writes to the Eclipse Console of the current log object

Returns:
a PrintStream connected to the Eclipse Console