org.eclipse.datatools.sqltools.debugger.model
Class SPDebugTarget
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.datatools.sqltools.debugger.model.SPDebugElement
org.eclipse.datatools.sqltools.debugger.model.SPDebugTarget
- All Implemented Interfaces:
- org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.IBreakpointListener, org.eclipse.debug.core.ILaunchListener, org.eclipse.debug.core.model.IDebugElement, org.eclipse.debug.core.model.IDebugTarget, org.eclipse.debug.core.model.IDisconnect, org.eclipse.debug.core.model.IMemoryBlockRetrieval, org.eclipse.debug.core.model.ISuspendResume, org.eclipse.debug.core.model.ITerminate
public class SPDebugTarget
- extends SPDebugElement
- implements org.eclipse.debug.core.model.IDebugTarget, org.eclipse.debug.core.ILaunchListener
SP debug target will only have at most one SPThread associated with it, many method of this class will delegate to
the SPThread.
- Author:
- Yang Liu
Constructor Summary |
SPDebugTarget(org.eclipse.debug.core.ILaunch launch,
org.eclipse.debug.core.model.IProcess process,
java.lang.String name)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.debug.core.model.IDebugElement |
getDebugTarget, getModelIdentifier |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
getAdapter |
SPDebugTarget
public SPDebugTarget(org.eclipse.debug.core.ILaunch launch,
org.eclipse.debug.core.model.IProcess process,
java.lang.String name)
setSPThread
public void setSPThread(SPThread thread)
- Associates the sole thread. Should only be called once, directly after the constructor
- Parameters:
thread
-
getProcess
public org.eclipse.debug.core.model.IProcess getProcess()
- Specified by:
getProcess
in interface org.eclipse.debug.core.model.IDebugTarget
getLaunch
public org.eclipse.debug.core.ILaunch getLaunch()
- Specified by:
getLaunch
in interface org.eclipse.debug.core.model.IDebugElement
- Overrides:
getLaunch
in class SPDebugElement
getThreads
public org.eclipse.debug.core.model.IThread[] getThreads()
- Specified by:
getThreads
in interface org.eclipse.debug.core.model.IDebugTarget
getSPThread
public SPThread getSPThread()
- Returns:
- the associated thread
hasThreads
public boolean hasThreads()
throws org.eclipse.debug.core.DebugException
- Specified by:
hasThreads
in interface org.eclipse.debug.core.model.IDebugTarget
- Throws:
org.eclipse.debug.core.DebugException
getName
public java.lang.String getName()
throws org.eclipse.debug.core.DebugException
- Specified by:
getName
in interface org.eclipse.debug.core.model.IDebugTarget
- Throws:
org.eclipse.debug.core.DebugException
canResume
public boolean canResume()
- Specified by:
canResume
in interface org.eclipse.debug.core.model.ISuspendResume
canSuspend
public boolean canSuspend()
- Specified by:
canSuspend
in interface org.eclipse.debug.core.model.ISuspendResume
isSuspended
public boolean isSuspended()
- Specified by:
isSuspended
in interface org.eclipse.debug.core.model.ISuspendResume
resume
public void resume()
throws org.eclipse.debug.core.DebugException
- Specified by:
resume
in interface org.eclipse.debug.core.model.ISuspendResume
- Throws:
org.eclipse.debug.core.DebugException
suspend
public void suspend()
throws org.eclipse.debug.core.DebugException
- Specified by:
suspend
in interface org.eclipse.debug.core.model.ISuspendResume
- Throws:
org.eclipse.debug.core.DebugException
canTerminate
public boolean canTerminate()
- Specified by:
canTerminate
in interface org.eclipse.debug.core.model.ITerminate
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interface org.eclipse.debug.core.model.ITerminate
terminated
public void terminated()
- this method is called by itself or the thread when the debug target is terminated.
disconnected
public void disconnected()
terminate
public void terminate()
throws org.eclipse.debug.core.DebugException
- Specified by:
terminate
in interface org.eclipse.debug.core.model.ITerminate
- Throws:
org.eclipse.debug.core.DebugException
canDisconnect
public boolean canDisconnect()
- Specified by:
canDisconnect
in interface org.eclipse.debug.core.model.IDisconnect
disconnect
public void disconnect()
throws org.eclipse.debug.core.DebugException
- Specified by:
disconnect
in interface org.eclipse.debug.core.model.IDisconnect
- Throws:
org.eclipse.debug.core.DebugException
isDisconnected
public boolean isDisconnected()
- Specified by:
isDisconnected
in interface org.eclipse.debug.core.model.IDisconnect
supportsBreakpoint
public boolean supportsBreakpoint(org.eclipse.debug.core.model.IBreakpoint breakpoint)
- Specified by:
supportsBreakpoint
in interface org.eclipse.debug.core.model.IDebugTarget
supportsStorageRetrieval
public boolean supportsStorageRetrieval()
- Specified by:
supportsStorageRetrieval
in interface org.eclipse.debug.core.model.IMemoryBlockRetrieval
getMemoryBlock
public org.eclipse.debug.core.model.IMemoryBlock getMemoryBlock(long startAddress,
long length)
throws org.eclipse.debug.core.DebugException
- Specified by:
getMemoryBlock
in interface org.eclipse.debug.core.model.IMemoryBlockRetrieval
- Throws:
org.eclipse.debug.core.DebugException
getSuspendCount
public int getSuspendCount()
- Returns:
- the number of times the debug target suspended.
internalIncreaseSuspendCount
public void internalIncreaseSuspendCount()
- Increases the suspend count by one. Called internally by the IThread when they are being suspended.
launchRemoved
public void launchRemoved(org.eclipse.debug.core.ILaunch launch)
- Specified by:
launchRemoved
in interface org.eclipse.debug.core.ILaunchListener
launchAdded
public void launchAdded(org.eclipse.debug.core.ILaunch launch)
- Specified by:
launchAdded
in interface org.eclipse.debug.core.ILaunchListener
launchChanged
public void launchChanged(org.eclipse.debug.core.ILaunch launch)
- Specified by:
launchChanged
in interface org.eclipse.debug.core.ILaunchListener
breakpointAdded
public void breakpointAdded(org.eclipse.debug.core.model.IBreakpoint breakpoint)
- Specified by:
breakpointAdded
in interface org.eclipse.debug.core.IBreakpointListener
breakpointRemoved
public void breakpointRemoved(org.eclipse.debug.core.model.IBreakpoint breakpoint,
org.eclipse.core.resources.IMarkerDelta delta)
- Specified by:
breakpointRemoved
in interface org.eclipse.debug.core.IBreakpointListener
breakpointChanged
public void breakpointChanged(org.eclipse.debug.core.model.IBreakpoint breakpoint,
org.eclipse.core.resources.IMarkerDelta delta)
- Specified by:
breakpointChanged
in interface org.eclipse.debug.core.IBreakpointListener