public class DBRecorder extends Object implements Runnable, XJDialogProgressDelegate
| Modifier and Type | Class and Description |
|---|---|
static class |
DBRecorder.FixBugRemoteDebugEventSocketListener |
class |
DBRecorder.PlayEventRunnable |
class |
DBRecorder.StepOver |
| Modifier and Type | Field and Description |
|---|---|
protected String |
address |
protected NumberSet |
breakEvents |
protected boolean |
cancelled |
protected int |
currentTokenIndex |
protected int |
currentTokenIndexEventNumber |
protected boolean |
debuggerReceivedTerminateEvent
This flag is used to indicate that the debugger received the terminate event.
|
protected DebuggerTab |
debuggerTab |
protected DBRecorderEventListener |
eventListener |
protected List<DBEvent> |
events |
protected Stack<String> |
grammarNamesStack
Current grammar the recorder is in
|
protected boolean |
ignoreBreakpoints |
protected int |
lastTokenIndexEventNumber |
protected org.antlr.runtime.debug.RemoteDebugEventSocketListener |
listener |
static int |
MAX_RETRY |
protected int |
port |
protected int |
position |
protected XJDialogProgress |
progress |
protected boolean |
remoteParserStateWarned
Flag used to indicate if the user has been warning about a problem
with the remote parser state.
|
protected int |
status |
static int |
STATUS_BREAK |
static int |
STATUS_LAUNCHING |
static int |
STATUS_RUNNING |
static int |
STATUS_STOPPED |
static int |
STATUS_STOPPING |
protected DBRecorder.StepOver |
stepOver |
protected int |
stoppedOnEvent |
| Constructor and Description |
|---|
DBRecorder(DebuggerTab debuggerTab) |
| Modifier and Type | Method and Description |
|---|---|
void |
breaksOnEvent(boolean wait) |
void |
checkRemoteParserHeaders()
This method checks that the remote parser's states are in sync with
the state of the debugger (i.e.
|
boolean |
checkRemoteParserState()
Check any error coming from the remote parser.
|
void |
close() |
void |
connect(String address,
int port) |
void |
connectionCancelled() |
void |
connectionFailed() |
void |
connectionSuccess() |
void |
dialogDidCancel() |
void |
fastForward() |
Set |
getBreakEvents() |
int |
getCurrentEventPosition() |
List<DBEvent> |
getCurrentEvents() |
DBEvent |
getEvent() |
DBEvent |
getLastEvent() |
int |
getOnBreakEvent()
Return the event type that causes the break
|
int |
getStatus() |
int |
getStoppedOnEvent() |
void |
goToEnd() |
void |
goToStart() |
void |
handleGrammarName(DBEvent event) |
void |
hideProgress() |
boolean |
ignoreBreakpoints() |
boolean |
isAlive()
Return true if the debugger is alive (i.e.
|
boolean |
isAtBeginning() |
boolean |
isAtEnd() |
boolean |
isOnBreakEvent()
Return true if the debugger hitted a break event
|
boolean |
isRunning()
Return true if the debugger is running
|
void |
listenerEvent(DBEvent event)
This method is called by DBRecorderEventListener for each event received from
the remote parser.
|
protected void |
playEvents(boolean reset) |
void |
queryGrammarBreakpoints() |
void |
recordIndexes(DBEvent event)
This method keeps track of the last consumed index in order to display
useful information if an invalid index is detected
|
void |
requestStop() |
void |
reset() |
void |
run() |
void |
setBreakEvents(Set events) |
void |
setIgnoreBreakpoints(boolean flag) |
void |
setPositionToEnd() |
void |
setStatus(int status) |
void |
setStoppedOnEvent(int event) |
void |
showProgress() |
void |
stepBackward(Set breakEvents) |
void |
stepContinue(Set breakEvents) |
void |
stepForward(Set breakEvents) |
boolean |
stepMove(int direction)
This method returns false if no more event is available
|
void |
stepOver() |
void |
stop() |
void |
threadNotify() |
void |
threadWait() |
public static final int STATUS_STOPPED
public static final int STATUS_STOPPING
public static final int STATUS_LAUNCHING
public static final int STATUS_RUNNING
public static final int STATUS_BREAK
public static final int MAX_RETRY
protected DebuggerTab debuggerTab
protected int status
protected boolean cancelled
protected String address
protected int port
protected int position
protected NumberSet breakEvents
protected int stoppedOnEvent
protected boolean ignoreBreakpoints
protected DBRecorder.StepOver stepOver
protected int lastTokenIndexEventNumber
protected int currentTokenIndexEventNumber
protected int currentTokenIndex
protected DBRecorderEventListener eventListener
protected org.antlr.runtime.debug.RemoteDebugEventSocketListener listener
protected XJDialogProgress progress
protected boolean debuggerReceivedTerminateEvent
protected boolean remoteParserStateWarned
public DBRecorder(DebuggerTab debuggerTab)
public void close()
public void showProgress()
public void hideProgress()
public boolean isRunning()
public boolean isAlive()
public void reset()
public DBEvent getEvent()
public DBEvent getLastEvent()
public int getCurrentEventPosition()
public void setPositionToEnd()
public void setBreakEvents(Set events)
public Set getBreakEvents()
public void setStoppedOnEvent(int event)
public int getStoppedOnEvent()
public void setIgnoreBreakpoints(boolean flag)
public boolean ignoreBreakpoints()
public void queryGrammarBreakpoints()
public boolean isOnBreakEvent()
public int getOnBreakEvent()
public void setStatus(int status)
public int getStatus()
public boolean isAtBeginning()
public boolean isAtEnd()
public void stepBackward(Set breakEvents)
public void stepForward(Set breakEvents)
public void stepOver()
public void stepContinue(Set breakEvents)
public boolean stepMove(int direction)
public void goToStart()
public void goToEnd()
public void fastForward()
public void connect(String address, int port)
public void connectionSuccess()
public void connectionFailed()
public void connectionCancelled()
public void requestStop()
public void stop()
public void checkRemoteParserHeaders()
public boolean checkRemoteParserState()
public void recordIndexes(DBEvent event)
public void handleGrammarName(DBEvent event)
public void listenerEvent(DBEvent event)
public void threadNotify()
public void threadWait()
public void breaksOnEvent(boolean wait)
protected void playEvents(boolean reset)
public void dialogDidCancel()
dialogDidCancel in interface XJDialogProgressDelegateCopyright © 2013. All rights reserved.