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