public class ParsingOutputStreamTask extends SimpleOutputStreamTask
SimpleOutputStreamTask.WLTypes
BufferSize, defaultColor, in, lineBuffer, output, SleepDelayMSec
abortFlag, finishFlag
Constructor and Description |
---|
ParsingOutputStreamTask(java.io.InputStream in,
Output output,
java.awt.Color defaultColor,
java.awt.Color backgroundColor,
CommandOutputParser extErrorParser,
AnsiEscapeParser extAnsiParser)
Create instance using external parsers.
|
ParsingOutputStreamTask(java.io.InputStream in,
Output output,
java.awt.Color defaultColor,
java.awt.Color backgroundColor,
org.gjt.sp.jedit.View view,
errorlist.DefaultErrorSource des,
java.lang.String currentDirectory)
Create instance using given View and DefaultErrorSource.
|
ParsingOutputStreamTask(java.io.InputStream in,
Output output,
java.awt.Color defaultColor,
Console console,
java.lang.String currentDirectory)
Create instance using default Console's parameters.
|
Modifier and Type | Method and Description |
---|---|
protected void |
actionInsideWaitingLoop(java.io.InputStreamReader isr)
Extended outputting: working process outputs nothing a long time.
|
protected void |
afterWorking()
Run AFTER:
- main working loop ends
- "finalOutputing()" method
(under "try" section)
|
protected void |
finalOutputting()
Dump remained data from internal buffer "lineBuffer"
to output "output" with color "defaultColor".
|
protected void |
outputData()
Do followed:
- exchanging and removing symbols in whole input line
- splitting input line by line breaks
|
boolean |
pop(boolean forced)
Pop the cached data from the outputting cache to Output.
|
void |
push(javax.swing.text.SimpleAttributeSet currentAttrs,
java.lang.String str)
Push a string to the outputting cache with a some AttributeSet.
|
void |
setAnsiParser(AnsiEscapeParser extAnsiParser)
Set given ansi parser.
|
void |
setAnsiParser(java.awt.Color defaultColor,
java.awt.Color backgroundColor)
Create new ansi parser and set one.
|
void |
setErrorParser(CommandOutputParser extErrorParser)
Set given error parser..
|
void |
setErrorParser(org.gjt.sp.jedit.View view,
errorlist.DefaultErrorSource des,
java.awt.Color defaultColor,
java.lang.String currentDirectory)
Create new error parser and set one.
|
java.lang.String |
trim_cache()
Remove a noncached data (placed AFTER the cache) from the cache.
|
beforeWorking, exception_dumpToLog, exception_dumpToOwner, run, setWaitingLoop
abort, finish
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public ParsingOutputStreamTask(java.io.InputStream in, Output output, java.awt.Color defaultColor, java.awt.Color backgroundColor, org.gjt.sp.jedit.View view, errorlist.DefaultErrorSource des, java.lang.String currentDirectory)
in
- input stream, from which we receive dataoutput
- instance implements OutputdefaultColor
- default foreground colorbackgroundColor
- default backgroundColor colorview
- working jEdit's viewdes
- error source for error parsercurrentDirectory
- console's current (working) directorypublic ParsingOutputStreamTask(java.io.InputStream in, Output output, java.awt.Color defaultColor, Console console, java.lang.String currentDirectory)
in
- input stream, from which we receive dataoutput
- instance implements OutputdefaultColor
- default foreground colorconsole
- console, which manipulates the input streamcurrentDirectory
- console's current (working) directorypublic ParsingOutputStreamTask(java.io.InputStream in, Output output, java.awt.Color defaultColor, java.awt.Color backgroundColor, CommandOutputParser extErrorParser, AnsiEscapeParser extAnsiParser)
in
- input stream, from which we receive dataoutput
- instance implements OutputdefaultColor
- default foreground colorbackgroundColor
- default backgroundColor colorextErrorParser
- given error parser instanceextAnsiParser
- given ansi parser instancepublic void push(javax.swing.text.SimpleAttributeSet currentAttrs, java.lang.String str)
currentAttrs
- current value of the AttributeSetstr
- outputed stringpublic boolean pop(boolean forced)
forced
- if "true" the cache is flushed by forcepublic java.lang.String trim_cache()
protected void actionInsideWaitingLoop(java.io.InputStreamReader isr) throws java.lang.Exception
actionInsideWaitingLoop
in class SimpleOutputStreamTask
java.lang.Exception
protected void afterWorking() throws java.lang.Exception
SimpleOutputStreamTask
afterWorking
in class SimpleOutputStreamTask
java.lang.Exception
protected void finalOutputting()
SimpleOutputStreamTask
finalOutputting
in class SimpleOutputStreamTask
protected void outputData() throws java.lang.Exception
outputData
in class SimpleOutputStreamTask
java.lang.Exception
public void setAnsiParser(AnsiEscapeParser extAnsiParser)
extAnsiParser
- given ansi parser instancepublic void setAnsiParser(java.awt.Color defaultColor, java.awt.Color backgroundColor)
defaultColor
- default foreground colorbackgroundColor
- default backgroundColor colorpublic void setErrorParser(CommandOutputParser extErrorParser)
extErrorParser
- given error parser instancepublic void setErrorParser(org.gjt.sp.jedit.View view, errorlist.DefaultErrorSource des, java.awt.Color defaultColor, java.lang.String currentDirectory)
view
- working jEdit's viewdes
- error source for error parserdefaultColor
- default foreground colorcurrentDirectory
- console's current (working) directory