Class BreakpointRuntimeHandler
java.lang.Object
org.eclipse.emf.mwe.internal.core.debug.processing.handlers.BreakpointRuntimeHandler
- All Implemented Interfaces:
Runnable
,ProcessHandler
,RuntimeHandler
public class BreakpointRuntimeHandler
extends Object
implements RuntimeHandler, ProcessHandler, Runnable
This class handles the communication of Breakpoints on the runtime side. It
listens in an extra thread for set and removal of breakpoints. The
DebugMonitor
uses this class to suspend the runtime process at
breakpoints.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Connection
protected DebugMonitor
static final int
static final int
Fields inherited from interface org.eclipse.emf.mwe.internal.core.debug.processing.ProcessHandler
INTERRUPT, POP, PUSH, SHALL_HANDLE, SUSPEND
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(DebugMonitor monitor, Connection connection) initiate the instantiated handler.boolean
if true, the handler has the last call and will be processed at the last handlervoid
run()
boolean
shallHandle
(boolean lastState, Object element, int flag) no contribution hereboolean
shallInterrupt
(boolean lastState) no contribution hereboolean
shallSuspend
(boolean lastState, Object element, int flag) returns true if a breakpoint is rgeistered for that elementvoid
start the listening process in an extra thread, if required
-
Field Details
-
SET
public static final int SET- See Also:
-
REMOVE
public static final int REMOVE- See Also:
-
connection
-
monitor
-
-
Constructor Details
-
BreakpointRuntimeHandler
public BreakpointRuntimeHandler()
-
-
Method Details
-
init
Description copied from interface:RuntimeHandler
initiate the instantiated handler. It gets theDebugMonitor
andConnection
instances that may be needed for the handler to do it's work
the handler may be registered at theDebugMonitor
dependent on the type of handler.- Specified by:
init
in interfaceRuntimeHandler
- Parameters:
monitor
- the DebugMonitorconnection
- the connection to the debugger framework- See Also:
-
startListener
public void startListener()Description copied from interface:RuntimeHandler
start the listening process in an extra thread, if required- Specified by:
startListener
in interfaceRuntimeHandler
- See Also:
-
run
public void run() -
isLastCall
public boolean isLastCall()Description copied from interface:ProcessHandler
if true, the handler has the last call and will be processed at the last handler- Specified by:
isLastCall
in interfaceProcessHandler
- Returns:
- whether or not
-
shallSuspend
returns true if a breakpoint is rgeistered for that element- Specified by:
shallSuspend
in interfaceProcessHandler
- Parameters:
lastState
- the consolidated decisions of previously asked listenerselement
- the element that is questionedflag
- one of the valuesIEventHandler.NORMAL_FRAME
orIEventHandler.END_FRAME
- Returns:
- if the process shall suspend based on the last state and the evaluation of the current element
- See Also:
-
shallHandle
no contribution here- Specified by:
shallHandle
in interfaceProcessHandler
- Parameters:
lastState
- the consolidated decisions of previously asked listenerselement
- the element that is questionedflag
- one of the valuesIProcessHandler.PUSH
orIProcessHandler.POP
- Returns:
- true if element shall be handled
- See Also:
-
shallInterrupt
public boolean shallInterrupt(boolean lastState) no contribution here- Specified by:
shallInterrupt
in interfaceProcessHandler
- Parameters:
lastState
- the consolidated decisions of previously asked listeners- Returns:
- if the process shall be interrupted based on the last state and the evaluation of the current element
- See Also:
-