this will manage the visitors in threads
TODO make visitors speak only to master
all actions to outside should be handled with invokeLater
getBreakPointTable
public BreakPointTable getBreakPointTable()
editor will call this to insert break point handler
in line number panel.
getMultiStepAction
public Action getMultiStepAction()
getSingleStepAction
public Action getSingleStepAction()
getStartAction
public Action getStartAction()
getStartDebugAction
public Action getStartDebugAction()
getStopAction
public Action getStopAction()
isBreak
public boolean isBreak(int line)
visitors should check this and suspend operation
when this returns true.
- true if run single step or
if run debug and break point exists
isDebugRun
public boolean isDebugRun()
visitors should call this to check if debug run.
isStopRequested
public boolean isStopRequested()
the running visitor should check this frequently and stop
as soon as possible if this is true.
- true if user requested interpreter to stop.
run
public void run()
thread to process all the parsing and interpreting.
this thread will parse the code (javacc) and then start
a visitor which will visit the syntax tree (AST*.java).
HERE IS PARSER AND VISITOR BEGIN
startVisitor(boolean)
startVisitor
public void startVisitor(boolean debug)
this will start a visitor.
called by user interaction.
stepVisitor
public void stepVisitor(boolean single)
make visitor continue if it is waiting.
called by user interaction.
stopVisitor
public void stopVisitor()
make interpreter stop as soon as possible.
called by user interaction.
visitorRunning
public void visitorRunning()
the waiting visitor is now running again.
called by visitor.
visitorStarted
public void visitorStarted()
a visitor just started.
called by visitor.
visitorStopped
public void visitorStopped()
the running visitor just stopped.
called by visitor.
visitorWaiting
public void visitorWaiting(int line)
visitor will wait until someone calls notify.
called by visitor.