IDebugDriver Interface

com.bea.ide.debug
IDebugDriver Interface

public interface IDebugDriver

This is the driver that must be implemented by a document for it to partake in debugging.


All Known Implementing Classes
DefaultDebugDriver

Method Summary

public boolean
addBreakPoint(ISourceBreakPoint bp)
Sets a break point on the given line in the given file.
public IDebugBreakPoint
createBreakPoint(IDocument file, IDocumentView view, Point point)
This will be called if we are unable to come up with a line of code to put a breakpoint on.
public ISourceBreakPoint
createBreakPoint(IDocument file, int line)
This creates a breakpoint with the given URI + line number.
public ISourceBreakPoint[]
createMethodBreakPoint(IDocument file, String className, String methodName, String[] params)
This creates a breakpoint with the given IDocument + class + method names.
public IDebugBreakPoint
getBreakPoint(IDocument file, int line)
Returns the break point for a given line.
public IDebugBreakPoint
getBreakPoint(IDebugBreakPoint bp)
Returns an equivalent breakpoint to the one being passed in, if one exists that the driver knows about.
public boolean
hasInstructionPoint(IDocument file, int line)
Tells if the instruction point is on this line in this file.
public void
removeBreakPoint(ISourceBreakPoint breakPoint)
Removes a break point from the given line in the given file.
public IDebugInstructionPoint
setInstructionPoint(IDocument file, int line, int type)
Sets an instruction point on a given line.
public void
unsetInstructionPoint(IDebugInstructionPoint ip)
Removes the instruction point from the given line.

Method Detail

addBreakPoint(ISourceBreakPoint) Method

public boolean addBreakPoint(ISourceBreakPoint bp)
Sets a break point on the given line in the given file.

Parameters

bp
the breakpoint created by a call to one of the create breakpoint calls in this driver.

Returns

true if adding the breakpoint succeeded, false if not. Will fail if there is the requested line number is past the end of the document.

createBreakPoint(IDocument, IDocumentView, Point) Method

public IDebugBreakPoint createBreakPoint(IDocument file, 
                                         IDocumentView view, 
                                         Point point)
This will be called if we are unable to come up with a line of code to put a breakpoint on. We will just send in the point the breakpoint occured on. This breakpoint will not be active, until it is formally added by calling IDebugDriver.addBreakPoint(ISourceBreakPoint).

Parameters

file
the file the breakpoint will be created in.
view
the document view the point refers to.
point
the point to create a breakpoint for, or if null, the currently selected location.

Returns

a IDebugBreakPoint representing the breakpoint that was created.

createBreakPoint(IDocument, int) Method

public ISourceBreakPoint createBreakPoint(IDocument file, 
                                          int line)
This creates a breakpoint with the given URI + line number. This will not actually be associated with a line in a document, until addBreakPoint is called.

Parameters

file
the file the breakpoint will be created in.
line
the line the breakpoint will be created on.

Returns

a IDebugBreakPoint representing the breakpoint that was created.

createMethodBreakPoint(IDocument, String, String, String[]) Method

public ISourceBreakPoint[] createMethodBreakPoint(IDocument file, 
                                                String className, 
                                                String methodName, 
                                                String[] params)
This creates a breakpoint with the given IDocument + class + method names. This will not actually be associated with a line in a document, until addBreakPoint is called. If more than one breakpoint can correspond to the parameters passed in, all will be returned.

Parameters

file
the file the breakpoint is to be created in.
className
the class name to resolve the method in.
methodName
the name of the method to create a breakpoint for.
params
the list of parameters for the method to create a breakpoint for. If this is null, a breakpoint will be created for all methods that match for any set of parameters.

Returns

an array of ISourceBreakPoint that represent all the breakpoints created.

getBreakPoint(IDocument, int) Method

public IDebugBreakPoint getBreakPoint(IDocument file, 
                                      int line)
Returns the break point for a given line. If there is not a breakpoint currenly set on this line, this will return null. This method will return the exact breakpoint being used, not a copy.

Parameters

file
the IDocument to look in for the breakpoint.
line
the line number to look on for the breakpoint.

Returns

null if no breakpoint is on the specified line in the specified file otherwise this will return the breakpoint that is on that line.

getBreakPoint(IDebugBreakPoint) Method

public IDebugBreakPoint getBreakPoint(IDebugBreakPoint bp)
Returns an equivalent breakpoint to the one being passed in, if one exists that the driver knows about. The breakpoint returned will not be the same breakpoint as the one passed in. It will be the exact breakpoint that is being used in the driver. This is important so the DebugSvc can keep track of brekapoint IDs.

Parameters

bp
a breakpoint containing all the information needed for the driver to try to find a match.

Returns

null if no such breakpoint exists, otherwise this will return the exact instance of the breakpoint that is being used.

hasInstructionPoint(IDocument, int) Method

public boolean hasInstructionPoint(IDocument file, 
                                   int line)
Tells if the instruction point is on this line in this file.

Parameters

file
the file to query for an instruction point.
line
the line to look on for an instruction point.

Returns

a boolean saying whether there was an instruction point added on that line.

removeBreakPoint(ISourceBreakPoint) Method

public void removeBreakPoint(ISourceBreakPoint breakPoint)
Removes a break point from the given line in the given file.

Parameters

breakPoint
the breakpoint to remove.

setInstructionPoint(IDocument, int, int) Method

public IDebugInstructionPoint setInstructionPoint(IDocument file, 
                                                  int line, 
                                                  int type)
Sets an instruction point on a given line. This is used for both current execution point, and a stack frame execution point.

Parameters

file
the file to set the instruction point in.
line
the line to set the instruction point on.
type
the type of instruction point to set. Currently, the only supported values are: IDebugInstructionPoint.INSTRUCTION_POINT and IDebugInstructionPoint.STACK_FRAME_POINT

unsetInstructionPoint(IDebugInstructionPoint) Method

public void unsetInstructionPoint(IDebugInstructionPoint ip)
Removes the instruction point from the given line.

Parameters

ip
the IDebugInstructionPoint to remove.