org.eclipse.datatools.sqltools.debugger.model
Class SPDebugElement

java.lang.Object
  extended by org.eclipse.core.runtime.PlatformObject
      extended by org.eclipse.datatools.sqltools.debugger.model.SPDebugElement
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.debug.core.model.IDebugElement
Direct Known Subclasses:
SPDebugTarget, SPStackFrame, SPThread, SPValue, SPVariable

public class SPDebugElement
extends org.eclipse.core.runtime.PlatformObject
implements org.eclipse.debug.core.model.IDebugElement

Super class for all debug model elements. With helper functions for firing events and handle exception, etc.

Author:
Yang Liu

Constructor Summary
SPDebugElement(SPDebugTarget target)
           
 
Method Summary
 void fireChangeEvent(int detail)
          Fires a debug event marking the CHANGE of this element with the specifed detail code.
 void fireResumeEvent(int detail)
          Fires a debug event marking the RESUME of this element with the associated detail.
 void fireSuspendEvent(int detail)
          Fires a debug event marking the SUSPEND of this element with the associated detail.
 java.lang.Object getAdapter(java.lang.Class adapter)
           
 org.eclipse.debug.core.model.IDebugTarget getDebugTarget()
           
 org.eclipse.debug.core.ILaunch getLaunch()
           
 java.lang.String getModelIdentifier()
           
 SPDebugTarget getSPDebugTarget()
           
 void notSupported()
          Throws a new debug exception with a status code of NOT_SUPPORTED.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPDebugElement

public SPDebugElement(SPDebugTarget target)
Method Detail

getModelIdentifier

public java.lang.String getModelIdentifier()
Specified by:
getModelIdentifier in interface org.eclipse.debug.core.model.IDebugElement

getDebugTarget

public final org.eclipse.debug.core.model.IDebugTarget getDebugTarget()
Specified by:
getDebugTarget in interface org.eclipse.debug.core.model.IDebugElement

getSPDebugTarget

public final SPDebugTarget getSPDebugTarget()

getLaunch

public org.eclipse.debug.core.ILaunch getLaunch()
Specified by:
getLaunch in interface org.eclipse.debug.core.model.IDebugElement

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class org.eclipse.core.runtime.PlatformObject

fireResumeEvent

public void fireResumeEvent(int detail)
Fires a debug event marking the RESUME of this element with the associated detail.

Parameters:
detail - The int detail of the event
See Also:
DebugEvent

fireSuspendEvent

public void fireSuspendEvent(int detail)
Fires a debug event marking the SUSPEND of this element with the associated detail.

Parameters:
detail - The int detail of the event
See Also:
DebugEvent

fireChangeEvent

public void fireChangeEvent(int detail)
Fires a debug event marking the CHANGE of this element with the specifed detail code.

Parameters:
detail - one of STATE or CONTENT

notSupported

public void notSupported()
                  throws org.eclipse.debug.core.DebugException
Throws a new debug exception with a status code of NOT_SUPPORTED.

Parameters:
message - Failure message
Throws:
org.eclipse.debug.core.DebugException - The exception with a status code of NOT_SUPPORTED.