JavaMethodBreakpoint Class

com.bea.ide.lang.java.driver
JavaMethodBreakpoint Class

public class JavaMethodBreakpoint

    extends SourceBreakpoint
    implements IElementChangeListener

Implementation of method breakpoints for Java files. Tracks edits of the documents to keep the method breakpoint associated with the original method if the method's argument list changes, the method is renamed, etc. If the method is overloaded, one breakpoint per implementation is created.


Hierarchy
Object
  DefaultBreakpoint
    SourceBreakpoint
      JavaMethodBreakpoint
All Implemented Interfaces

IDebugBreakPoint, IElementChangeListener, ISourceBreakPoint, Serializable

Nested Class Summary

 
Nested classes from  com.bea.ide.sourceeditor.driver.SourceBreakpoint
SourceBreakpoint.DefaultLine
 

Field Summary

   
Fields from  com.bea.ide.sourceeditor.driver.SourceBreakpoint
_doc, _file, _line, _lineNum, _model
 
Fields from  com.bea.ide.debug.DefaultBreakpoint
_fDisabled, _id, _message, _properties, _propertyChangeSupport
 
Fields from interface com.bea.ide.debug.IDebugBreakPoint
BP_PROP_CONDITION, INVALID_ID, PROP_ERROR_MESSAGE
 
Fields from interface com.bea.ide.debug.ISourceBreakPoint
PROP_LINE_NUMBER
 

Constructor Summary

JavaMethodBreakpoint(IDocument file, String className, String method, String params)

Creates a new Java method breakpoint associated with the method information specified
 

Method Summary

public IDebugInstructionPoint
breakpointHit()
This is called when the breakpoint gets hit.
public void
documentLoaded()
In init, this breakpoint is about to be associated with an actual file.
public void
documentUnloaded()
In the case that a file is going away, we need to make sure to persist the current offset info.
public void
elementChange(ElementChangeEvent e)
Implementation for IElementChangeListener used to keep the method associated with the correct method in the source code if its argument list or name changes during editing.
public String
getClassName()
Gets the name of the class that contains the method
public String
getMethod()
Gets the name of the method, not including arguments, return type, etc
public String[]
getParams()
Gets all the type of all the arguments to the method
public synchronized Thread
getResolver()
The resolver thread is the thread that does the work of connecting the method breakpoint with an element in the source document.
public void
reset(Element elt)
public void
syncBreakpoint(IDebugBreakPoint.IBreakpointContext dbgCmds)
This is called to have the Breakpoint synchronize itself with the proxy.
public String
toString()
Method breakpoints are shown as CLASSNAME.METHODNAME(ARGUMENTTYPES)
public void
updateLine()
Re-syncs the line information with the underlying document
 
Methods from  com.bea.ide.sourceeditor.driver.SourceBreakpoint
getCachedDocument, getExtension, getFile, getLine, getURI,
 
Methods from  com.bea.ide.debug.DefaultBreakpoint
clearBreakpoint, disable, getErrorMessage, getId, getProperties, getProperty, isDisabled, isValid, setErrorMessage, setId, setProperties, setProperty, supportsProperty, toString
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.ide.debug.IDebugBreakPoint
breakpointHit, clearBreakpoint, disable, getErrorMessage, getId, getProperties, getProperty, isDisabled, isValid, setErrorMessage, setId, setProperties, setProperty, supportsProperty, syncBreakpoint
 
Methods from interface com.bea.ide.element.IElementChangeListener
elementChange
 
Methods from interface com.bea.ide.debug.ISourceBreakPoint
documentLoaded, documentUnloaded, getCachedDocument, getLine, getURI, updateLine
 

Constructor Detail

JavaMethodBreakpoint

public JavaMethodBreakpoint(IDocument file, 
                            String className, 
                            String method, 
                            String[] params)
Creates a new Java method breakpoint associated with the method information specified
 

Method Detail

breakpointHit() Method

public IDebugInstructionPoint breakpointHit()
Description copied from IDebugBreakPoint.breakpointHit()
This is called when the breakpoint gets hit. This should take care of any processing that is needed when a breakpoint is hit. Normally, this will entail bringing the file to the forground, jumping to the current line, and setting an instruction point at the correct place.

Overrides
SourceBreakpoint.breakpointHit()

Returns

the new instruction point, or null if this breakpoint doesn't know how to display itself, like an exception breakpoint

documentLoaded() Method

public void documentLoaded()
In init, this breakpoint is about to be associated with an actual file. So we should open the file, and grab an element.

Overrides
SourceBreakpoint.documentLoaded()

documentUnloaded() Method

public void documentUnloaded()
Description copied from SourceBreakpoint.documentUnloaded()
In the case that a file is going away, we need to make sure to persist the current offset info.

Overrides
SourceBreakpoint.documentUnloaded()

elementChange(ElementChangeEvent) Method

public void elementChange(ElementChangeEvent e)
Implementation for IElementChangeListener used to keep the method associated with the correct method in the source code if its argument list or name changes during editing.

Parameters

e
The change event object describing the change.

getClassName() Method

public String getClassName()
Gets the name of the class that contains the method

Returns

the class that contains the method

getMethod() Method

public String getMethod()
Gets the name of the method, not including arguments, return type, etc

Returns

name of the method

getParams() Method

public String[] getParams()
Gets all the type of all the arguments to the method

Returns

arguments to the method

getResolver() Method

public synchronized Thread getResolver()
The resolver thread is the thread that does the work of connecting the method breakpoint with an element in the source document.


reset(Element) Method

public void reset(Element elt)
Overrides
SourceBreakpoint.reset(Element)

syncBreakpoint(IDebugBreakPoint.IBreakpointContext) Method

public void syncBreakpoint(IDebugBreakPoint.IBreakpointContext dbgCmds)
throws DebugTransportException
Description copied from IDebugBreakPoint.syncBreakpoint(IDebugBreakPoint.IBreakpointContext)
This is called to have the Breakpoint synchronize itself with the proxy. This function will be called for each breakpoint as a debugging session begins. It will also be called right after a breakpoint is set, for each project that contains the breakpoint.

Overrides
SourceBreakpoint.syncBreakpoint(IDebugBreakPoint.IBreakpointContext)

Parameters

dbgCmds
this is an IDebugBreakPoint.IBreakpointContext object that provides the context needed to be the breakpoint to communicate with the target VM.

Exceptions

DebugTransportException

toString() Method

public String toString()
Method breakpoints are shown as CLASSNAME.METHODNAME(ARGUMENTTYPES)

Overrides
SourceBreakpoint.toString()

Returns

string representation of the method

updateLine() Method

public void updateLine()
Description copied from ISourceBreakPoint.updateLine()
Re-syncs the line information with the underlying document

Overrides
SourceBreakpoint.updateLine()