Package org.stringtemplate.v4.gui
Class STViz
- java.lang.Object
-
- org.stringtemplate.v4.gui.STViz
-
public class STViz extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description java.util.List<InterpEvent>
allEvents
InterpEvent
currentEvent
InstanceScope
currentScope
ErrorManager
errMgr
java.util.List<STMessage>
errors
Interpreter
interp
java.lang.String
output
EvalTemplateEvent
root
JTreeSTModel
tmodel
java.util.List<java.lang.String>
trace
private java.util.concurrent.atomic.AtomicInteger
updateDepth
STViewFrame
viewFrame
protected static java.lang.String
WINDOWS_LINE_ENDINGS
-
Constructor Summary
Constructors Constructor Description STViz(ErrorManager errMgr, EvalTemplateEvent root, java.lang.String output, Interpreter interp, java.util.List<java.lang.String> trace, java.util.List<STMessage> errors)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InterpEvent
findEventAtOutputLocation(java.util.List<InterpEvent> events, int charIndex)
protected void
highlight(javax.swing.text.JTextComponent comp, int i, int j)
protected void
highlight(javax.swing.text.JTextComponent comp, int i, int j, boolean scroll)
static void
main(java.lang.String[] args)
void
open()
protected void
setText(javax.swing.JEditorPane component, java.lang.String text)
static void
test1()
static void
test2()
static void
test3()
static void
test4()
protected int
toComponentPosition(javax.swing.text.JTextComponent component, int position)
protected int
toEventPosition(javax.swing.text.JTextComponent component, int position)
protected void
updateAttributes(InstanceScope scope, STViewFrame m)
private void
updateCurrentST(STViewFrame m)
protected void
updateStack(InstanceScope scope, STViewFrame m)
void
waitForClose()
static void
writeFile(java.lang.String dir, java.lang.String fileName, java.lang.String content)
-
-
-
Field Detail
-
WINDOWS_LINE_ENDINGS
protected static final java.lang.String WINDOWS_LINE_ENDINGS
- See Also:
- Constant Field Values
-
root
public EvalTemplateEvent root
-
currentEvent
public InterpEvent currentEvent
-
currentScope
public InstanceScope currentScope
-
allEvents
public java.util.List<InterpEvent> allEvents
-
tmodel
public JTreeSTModel tmodel
-
errMgr
public ErrorManager errMgr
-
interp
public Interpreter interp
-
output
public java.lang.String output
-
trace
public java.util.List<java.lang.String> trace
-
errors
public java.util.List<STMessage> errors
-
viewFrame
public STViewFrame viewFrame
-
updateDepth
private final java.util.concurrent.atomic.AtomicInteger updateDepth
-
-
Constructor Detail
-
STViz
public STViz(ErrorManager errMgr, EvalTemplateEvent root, java.lang.String output, Interpreter interp, java.util.List<java.lang.String> trace, java.util.List<STMessage> errors)
-
-
Method Detail
-
open
public void open()
-
waitForClose
public void waitForClose() throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
updateCurrentST
private void updateCurrentST(STViewFrame m)
-
setText
protected void setText(javax.swing.JEditorPane component, java.lang.String text)
-
toComponentPosition
protected int toComponentPosition(javax.swing.text.JTextComponent component, int position)
-
toEventPosition
protected int toEventPosition(javax.swing.text.JTextComponent component, int position)
-
highlight
protected final void highlight(javax.swing.text.JTextComponent comp, int i, int j)
-
highlight
protected void highlight(javax.swing.text.JTextComponent comp, int i, int j, boolean scroll)
-
updateAttributes
protected void updateAttributes(InstanceScope scope, STViewFrame m)
-
updateStack
protected void updateStack(InstanceScope scope, STViewFrame m)
-
findEventAtOutputLocation
public InterpEvent findEventAtOutputLocation(java.util.List<InterpEvent> events, int charIndex)
-
main
public static void main(java.lang.String[] args) throws java.io.IOException
- Throws:
java.io.IOException
-
test1
public static void test1() throws java.io.IOException
- Throws:
java.io.IOException
-
test2
public static void test2() throws java.io.IOException
- Throws:
java.io.IOException
-
test3
public static void test3() throws java.io.IOException
- Throws:
java.io.IOException
-
test4
public static void test4() throws java.io.IOException
- Throws:
java.io.IOException
-
writeFile
public static void writeFile(java.lang.String dir, java.lang.String fileName, java.lang.String content)
-
-