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

java.lang.Object
  extended by org.eclipse.datatools.sqltools.debugger.model.SPDebugModelUtil

public class SPDebugModelUtil
extends java.lang.Object

Utility class to process routine debug model objects.

Author:
Yang Liu

Constructor Summary
SPDebugModelUtil()
           
 
Method Summary
static void changeAllBreakpointForSP(org.eclipse.datatools.sqltools.core.ProcIdentifier procid, org.eclipse.datatools.sqltools.core.ProcIdentifier newprocid)
          Renames procid to newprocid in all breakpoints.
static void changeProfileName(java.lang.String oldName, java.lang.String newName)
          Changes the profile name hold in DatabaseIdentifier of ProcIdentifier
static SPLineBreakpoint createLineBreakpoint(org.eclipse.datatools.sqltools.core.ProcIdentifier procid, int lineNumber, boolean register)
          Creates a line breakpoint at the specified line for the specified proc.
static java.util.List findAllLineBreakpoint(org.eclipse.datatools.sqltools.core.ProcIdentifier procid, int lineNumber)
          Finds breakpoints of all types in a Routine identified by procid, at line lineNumber
static java.util.List findAllSPLineBreakpointForSP(org.eclipse.datatools.sqltools.core.ProcIdentifier procid)
          Finds all breakpoints belonging to the specified routine
static SPLineBreakpoint findLineBreakpoint(org.eclipse.datatools.sqltools.core.ProcIdentifier procid, int lineNumber)
          Returns the breakpoint object in a Routine identified by procid, at line lineNumber
static java.lang.String getModelIdentifier()
          Returns the identifier of the debug model presentation the SPLineBreakpoint is associated with.
static java.lang.String[] hasProcInDebugging(java.lang.String connectionProfileName)
          Tests whether there is a procedural object is in debugging session
static boolean isProcInDebugging(org.eclipse.datatools.sqltools.core.ProcIdentifier procid)
           
static boolean isSPBreakpointMarker(org.eclipse.core.resources.IMarker marker, org.eclipse.datatools.sqltools.core.ProcIdentifier proc)
          Tests whether the marker is a SP breakpoint marker for the specified routine.
static boolean isSPBreakpointMarkerDelta(org.eclipse.core.resources.IMarkerDelta markerDelta, org.eclipse.datatools.sqltools.core.ProcIdentifier identifier)
          Tests whether the markerDelta is a SP breakpoint marker delta for the specified routine.
static void removeAllBreakpointForSP(org.eclipse.datatools.sqltools.core.ProcIdentifier procid)
          Removes all breakpoints for a particular routine.
static boolean supportCondition(SPLineBreakpoint bp)
          Tests whether a breakpoint support condition.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPDebugModelUtil

public SPDebugModelUtil()
Method Detail

getModelIdentifier

public static java.lang.String getModelIdentifier()
Returns the identifier of the debug model presentation the SPLineBreakpoint is associated with.


createLineBreakpoint

public static SPLineBreakpoint createLineBreakpoint(org.eclipse.datatools.sqltools.core.ProcIdentifier procid,
                                                    int lineNumber,
                                                    boolean register)
                                             throws org.eclipse.core.runtime.CoreException
Creates a line breakpoint at the specified line for the specified proc.

Parameters:
procid - Routine identifier
lineNumber - breakpoint line
Throws:
org.eclipse.core.runtime.CoreException

findLineBreakpoint

public static SPLineBreakpoint findLineBreakpoint(org.eclipse.datatools.sqltools.core.ProcIdentifier procid,
                                                  int lineNumber)
Returns the breakpoint object in a Routine identified by procid, at line lineNumber

Parameters:
procid - Routine identifier
lineNumber - line number
Returns:
a SPLineBreakpoint if any, otherwise null.

findAllLineBreakpoint

public static java.util.List findAllLineBreakpoint(org.eclipse.datatools.sqltools.core.ProcIdentifier procid,
                                                   int lineNumber)
Finds breakpoints of all types in a Routine identified by procid, at line lineNumber

Parameters:
procid - Routine identifier
lineNumber - line number
Returns:
list of IBreakpoint, may be empty

isSPBreakpointMarker

public static boolean isSPBreakpointMarker(org.eclipse.core.resources.IMarker marker,
                                           org.eclipse.datatools.sqltools.core.ProcIdentifier proc)
Tests whether the marker is a SP breakpoint marker for the specified routine.

Parameters:
marker -
proc - Routine identifier

isSPBreakpointMarkerDelta

public static boolean isSPBreakpointMarkerDelta(org.eclipse.core.resources.IMarkerDelta markerDelta,
                                                org.eclipse.datatools.sqltools.core.ProcIdentifier identifier)
Tests whether the markerDelta is a SP breakpoint marker delta for the specified routine.

Parameters:
markerDelta -
identifier -

supportCondition

public static boolean supportCondition(SPLineBreakpoint bp)
                                throws org.eclipse.core.runtime.CoreException
Tests whether a breakpoint support condition.

Parameters:
bp -
Returns:
true if no, otherwise false
Throws:
org.eclipse.core.runtime.CoreException

findAllSPLineBreakpointForSP

public static java.util.List findAllSPLineBreakpointForSP(org.eclipse.datatools.sqltools.core.ProcIdentifier procid)
Finds all breakpoints belonging to the specified routine

Parameters:
procid - Routine identifier
Returns:
list of SPLineBreakpoint, may be empty

removeAllBreakpointForSP

public static void removeAllBreakpointForSP(org.eclipse.datatools.sqltools.core.ProcIdentifier procid)
Removes all breakpoints for a particular routine.

Parameters:
procid - Routine identifier

changeAllBreakpointForSP

public static void changeAllBreakpointForSP(org.eclipse.datatools.sqltools.core.ProcIdentifier procid,
                                            org.eclipse.datatools.sqltools.core.ProcIdentifier newprocid)
Renames procid to newprocid in all breakpoints.

Parameters:
procid - old Routine identifier
newprocid - new Routine identifier

isProcInDebugging

public static boolean isProcInDebugging(org.eclipse.datatools.sqltools.core.ProcIdentifier procid)

hasProcInDebugging

public static java.lang.String[] hasProcInDebugging(java.lang.String connectionProfileName)
Tests whether there is a procedural object is in debugging session

Parameters:
connectionProfileName - name of connection profile
Returns:
Array of the procedural object name

changeProfileName

public static void changeProfileName(java.lang.String oldName,
                                     java.lang.String newName)
Changes the profile name hold in DatabaseIdentifier of ProcIdentifier

Parameters:
oldName -
newName -