Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.debug.core
Class JDIDebugModel


java.lang.Object
  extended by 
org.eclipse.jdt.debug.core.JDIDebugModel

public class JDIDebugModel
extends Object

Provides utility methods for creating debug targets and breakpoints specific to the JDI debug model.

To provide access to behavior and information specific to the JDI debug model, a set of interfaces are defined which extend the base set of debug element interfaces. For example, IJavaStackFrame is declared to extend IStackFrame, and provides methods specific to this debug model. The specialized interfaces are also available as adapters from the debug elements generated from this model.

This class provides static utility methods only.

Restriction:
This class is not intended to be subclassed by clients.
Restriction:
This class is not intended to be instantiated by clients.

Field Summary
static int DEF_REQUEST_TIMEOUT
          The default JDI request timeout when no preference is set.
static  String PREF_HCR_WITH_COMPILATION_ERRORS
          Preference key for specifying if hot code replace should be performed when a replacement class file contains compilation errors.
static  String PREF_REQUEST_TIMEOUT
          Preference key for default JDI request timeout value.
static  String PREF_SUSPEND_FOR_BREAKPOINTS_DURING_EVALUATION
          Boolean preference controlling whether breakpoints are hit during an evaluation operation.
 
Method Summary
static void addHotCodeReplaceListener ( IJavaHotCodeReplaceListener listener)
          Registers the given listener for hot code replace notifications.
static void addJavaBreakpointListener ( IJavaBreakpointListener listener)
          Registers the given listener for breakpoint notifications.
static  IJavaClassPrepareBreakpoint createClassPrepareBreakpoint ( IResource resource, String typeName, int memberType, int charStart, int charEnd, boolean register, Map attributes)
          Creates and returns a class prepare breakpoint for a type with the given name.
static  IJavaExceptionBreakpoint createExceptionBreakpoint ( IResource resource, String exceptionName, boolean caught, boolean uncaught, boolean checked, boolean register, Map attributes)
          Creates and returns an exception breakpoint for an exception with the given name.
static  IJavaLineBreakpoint createLineBreakpoint ( IResource resource, String typeName, int lineNumber, int charStart, int charEnd, int hitCount, boolean register, Map attributes)
          Creates and returns a line breakpoint in the type with the given name, at the given line number.
static  IJavaMethodBreakpoint createMethodBreakpoint ( IResource resource, String typePattern, String methodName, String methodSignature, boolean entry, boolean exit, boolean nativeOnly, int lineNumber, int charStart, int charEnd, int hitCount, boolean register, Map attributes)
          Creates and returns a method breakpoint with the specified criteria.
static  IJavaMethodEntryBreakpoint createMethodEntryBreakpoint ( IResource resource, String typeName, String methodName, String methodSignature, int lineNumber, int charStart, int charEnd, int hitCount, boolean register, Map attributes)
          Creates and returns a method entry breakpoint with the specified criteria.
static  IJavaPatternBreakpoint createPatternBreakpoint ( IResource resource, String sourceName, String pattern, int lineNumber, int charStart, int charEnd, int hitCount, boolean register, Map attributes)
          Deprecated. use createStratumBreakpoint instead
static  IJavaStratumLineBreakpoint createStratumBreakpoint ( IResource resource, String stratum, String sourceName, String sourcePath, String classNamePattern, int lineNumber, int charStart, int charEnd, int hitCount, boolean register, Map attributes)
          Creates and returns a line breakpoint identified by its source file name and/or path, and stratum that it is relative to.
static  IJavaTargetPatternBreakpoint createTargetPatternBreakpoint ( IResource resource, String sourceName, int lineNumber, int charStart, int charEnd, int hitCount, boolean register, Map attributes)
          Creates and returns a target pattern breakpoint for the given resource at the given line number.
static  IJavaWatchpoint createWatchpoint ( IResource resource, String typeName, String fieldName, int lineNumber, int charStart, int charEnd, int hitCount, boolean register, Map attributes)
          Creates and returns a watchpoint on a field with the given name in a type with the given name.
static  String getPluginIdentifier ()
          Returns the identifier for the JDI debug model plug-in
static  Preferences getPreferences ()
          Returns the preference store for this plug-in or null if the store is not available.
static  IJavaLineBreakpoint lineBreakpointExists ( IResource resource, String typeName, int lineNumber)
          Returns a Java line breakpoint that is already registered with the breakpoint manager for a type with the given name at the given line number in the given resource.
static  IJavaLineBreakpoint lineBreakpointExists ( String typeName, int lineNumber)
          Returns a Java line breakpoint that is already registered with the breakpoint manager for a type with the given name at the given line number.
static  IDebugTarget newDebugTarget ( ILaunch launch, com.sun.jdi.VirtualMachine vm, String name, IProcess process, boolean allowTerminate, boolean allowDisconnect)
          Creates and returns a debug target for the given VM, with the specified name, and associates the debug target with the given process for console I/O.
static  IDebugTarget newDebugTarget ( ILaunch launch, com.sun.jdi.VirtualMachine vm, String name, IProcess process, boolean allowTerminate, boolean allowDisconnect, boolean resume)
          Creates and returns a debug target for the given VM, with the specified name, and associates the debug target with the given process for console I/O.
static void removeHotCodeReplaceListener ( IJavaHotCodeReplaceListener listener)
          Unregisters the given listener for hot code replace notifications.
static void removeJavaBreakpointListener ( IJavaBreakpointListener listener)
          Unregisters the given listener for breakpoint notifications.
static void savePreferences ()
          Saves the preference store for this plug-in.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PREF_REQUEST_TIMEOUT

public static final 
String PREF_REQUEST_TIMEOUT
Preference key for default JDI request timeout value.


PREF_HCR_WITH_COMPILATION_ERRORS

public static final 
String PREF_HCR_WITH_COMPILATION_ERRORS
Preference key for specifying if hot code replace should be performed when a replacement class file contains compilation errors.


DEF_REQUEST_TIMEOUT

public static final int DEF_REQUEST_TIMEOUT
The default JDI request timeout when no preference is set.

See Also:
Constant Field Values

PREF_SUSPEND_FOR_BREAKPOINTS_DURING_EVALUATION

public static final 
String PREF_SUSPEND_FOR_BREAKPOINTS_DURING_EVALUATION
Boolean preference controlling whether breakpoints are hit during an evaluation operation. If true, breakpoints will be hit as usual during evaluations. If false, the breakpoint manager will be automatically disabled during evaluations.

Since:
3.0
Method Detail

newDebugTarget

public static 
IDebugTarget newDebugTarget(
ILaunch launch,
                                          com.sun.jdi.VirtualMachine vm,
                                          
String name,
                                          
IProcess process,
                                          boolean allowTerminate,
                                          boolean allowDisconnect)
Creates and returns a debug target for the given VM, with the specified name, and associates the debug target with the given process for console I/O. The allow terminate flag specifies whether the debug target will support termination (ITerminate). The allow disconnect flag specifies whether the debug target will support disconnection (IDisconnect). Launching the actual VM is a client responsibility. By default, the target VM will be resumed on startup. The debug target is added to the given launch.

Parameters:
launch - the launch the new debug target will be contained in
vm - the VM to create a debug target for
name - the name to associate with the VM, which will be returned from IDebugTarget.getName. If null the name will be retrieved from the underlying VM.
process - the process to associate with the debug target, which will be returned from IDebugTarget.getProcess
allowTerminate - whether the target will support termination
allowDisconnect - whether the target will support disconnection
Returns:
a debug target
Since:
2.0
See Also:
ITerminate, IDisconnect

newDebugTarget

public static 
IDebugTarget newDebugTarget(
ILaunch launch,
                                          com.sun.jdi.VirtualMachine vm,
                                          
String name,
                                          
IProcess process,
                                          boolean allowTerminate,
                                          boolean allowDisconnect,
                                          boolean resume)
Creates and returns a debug target for the given VM, with the specified name, and associates the debug target with the given process for console I/O. The allow terminate flag specifies whether the debug target will support termination (ITerminate). The allow disconnect flag specifies whether the debug target will support disconnection (IDisconnect). The resume flag specifies if the target VM should be resumed on startup (has no effect if the VM was already running when the connection to the VM was established). Launching the actual VM is a client responsibility. The debug target is added to the given launch.

Parameters:
launch - the launch the new debug target will be contained in
vm - the VM to create a debug target for
name - the name to associate with the VM, which will be returned from IDebugTarget.getName. If null the name will be retrieved from the underlying VM.
process - the process to associate with the debug target, which will be returned from IDebugTarget.getProcess
allowTerminate - whether the target will support termination
allowDisconnect - whether the target will support disconnection
resume - whether the target is to be resumed on startup. Has no effect if the target was already running when the connection to the VM was established.
Returns:
a debug target
Since:
2.0
See Also:
ITerminate, IDisconnect

getPluginIdentifier

public static 
String getPluginIdentifier()
Returns the identifier for the JDI debug model plug-in

Returns:
plug-in identifier

addHotCodeReplaceListener

public static void addHotCodeReplaceListener(
IJavaHotCodeReplaceListener listener)
Registers the given listener for hot code replace notifications. Has no effect if an identical listener is already registered.

Parameters:
listener - hot code replace listener
Since:
2.0
See Also:
IJavaHotCodeReplaceListener

removeHotCodeReplaceListener

public static void removeHotCodeReplaceListener(
IJavaHotCodeReplaceListener listener)
Unregisters the given listener for hot code replace notifications. Has no effect if an identical listener is not already registered.

Parameters:
listener - hot code replace listener
Since:
2.0
See Also:
IJavaHotCodeReplaceListener

addJavaBreakpointListener

public static void addJavaBreakpointListener(
IJavaBreakpointListener listener)
Registers the given listener for breakpoint notifications. Has no effect if an identical listener is already registered.

Parameters:
listener - breakpoint listener
Since:
2.0
See Also:
IJavaBreakpointListener

removeJavaBreakpointListener

public static void removeJavaBreakpointListener(
IJavaBreakpointListener listener)
Unregisters the given listener for breakpoint notifications. Has no effect if an identical listener is not already registered.

Parameters:
listener - breakpoint listener
Since:
2.0
See Also:
IJavaBreakpointListener

createLineBreakpoint

public static 
IJavaLineBreakpoint createLineBreakpoint(
IResource resource,
                                                       
String typeName,
                                                       int lineNumber,
                                                       int charStart,
                                                       int charEnd,
                                                       int hitCount,
                                                       boolean register,
                                                       
Map attributes)
                                                throws 
CoreException
Creates and returns a line breakpoint in the type with the given name, at the given line number. The marker associated with the breakpoint will be created on the specified resource. If a character range within the line is known, it may be specified by charStart/charEnd. If hitCount is > 0, the breakpoint will suspend execution when it is "hit" the specified number of times.

Parameters:
resource - the resource on which to create the associated breakpoint marker
typeName - the fully qualified name of the type the breakpoint is to be installed in. If the breakpoint is to be installed in an inner type, it is sufficient to provide the name of the top level enclosing type. If an inner class name is specified, it should be formatted as the associated class file name (i.e. with $). For example, example.SomeClass$InnerType, could be specified, but example.SomeClass is sufficient.
lineNumber - the lineNumber on which the breakpoint is set - line numbers are 1 based, associated with the source file in which the breakpoint is set
charStart - the first character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
charEnd - the last character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
hitCount - the number of times the breakpoint will be hit before suspending execution - 0 if it should always suspend
register - whether to add this breakpoint to the breakpoint manager
attributes - a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation, or null if none.
Returns:
a line breakpoint
Throws:
CoreException - If this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.
Since:
2.0

createPatternBreakpoint

public static 
IJavaPatternBreakpoint createPatternBreakpoint(
IResource resource,
                                                             
String sourceName,
                                                             
String pattern,
                                                             int lineNumber,
                                                             int charStart,
                                                             int charEnd,
                                                             int hitCount,
                                                             boolean register,
                                                             
Map attributes)
                                                      throws 
CoreException
Deprecated. use createStratumBreakpoint instead

Creates and returns a pattern breakpoint for the given resource at the given line number, which is installed in all classes whose fully qualified name matches the given pattern. If hitCount > 0, the breakpoint will suspend execution when it is "hit" the specified number of times.

Parameters:
resource - the resource on which to create the associated breakpoint marker
sourceName - the name of the source file in which the breakpoint is set, or null. When specified, the pattern breakpoint will install itself in classes that have a source file name debug attribute that matches this value, and satisfies the class name pattern.
pattern - the class name pattern in which the pattern breakpoint should be installed. The pattern breakpoint will install itself in every class which matches the pattern.
lineNumber - the lineNumber on which the breakpoint is set - line numbers are 1 based, associated with the source file in which the breakpoint is set
charStart - the first character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
charEnd - the last character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
hitCount - the number of times the breakpoint will be hit before suspending execution - 0 if it should always suspend
register - whether to add this breakpoint to the breakpoint manager
attributes - a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation, or null if none.
Returns:
a pattern breakpoint
Throws:
CoreException - If this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.

createStratumBreakpoint

public static 
IJavaStratumLineBreakpoint createStratumBreakpoint(
IResource resource,
                                                                 
String stratum,
                                                                 
String sourceName,
                                                                 
String sourcePath,
                                                                 
String classNamePattern,
                                                                 int lineNumber,
                                                                 int charStart,
                                                                 int charEnd,
                                                                 int hitCount,
                                                                 boolean register,
                                                                 
Map attributes)
                                                          throws 
CoreException
Creates and returns a line breakpoint identified by its source file name and/or path, and stratum that it is relative to.

Parameters:
resource - the resource on which to create the associated breakpoint marker
stratum - the stratum in which the source name, source path and line number are relative, or null. If null or if the specified stratum is not defined for a type, the source name, source path and line number are relative to the type's default stratum.
sourceName - the simple name of the source file in which the breakpoint is set, or null. The breakpoint will install itself in classes that have a source file name debug attribute that matches this value in the specified stratum, and satisfies the class name pattern and source path attribute. When null, the source file name debug attribute is not considered.
sourcePath - the qualified source file name in which the breakpoint is set, or null. The breakpoint will install itself in classes that have a source file path in the specified stratum that matches this value, and satisfies the class name pattern and source name attribute. When null, the source path attribute is not considered.
classNamePattern - the class name pattern to which the breakpoint should be restricted, or null. The breakpoint will install itself in each type that matches this class name pattern, with a satisfying source name and source path. Patterns may begin or end with '*', which matches 0 or more characters. A pattern that does not contain a '*' is equivalent to a pattern ending in '*'. Specifying null, or an empty string is the equivalent to "*". Multiple patterns can be specified by delimiting the patterns with a comma - e.g. "x.y.z,a.b.c". When multiple patterns are specified, The breakpoint will install itself in each of the types that match any of the specified class pattern, with a satisfying source name and source path.
lineNumber - the lineNumber on which the breakpoint is set - line numbers are 1 based, associated with the source file (stratum) in which the breakpoint is set
charStart - the first character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
charEnd - the last character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
hitCount - the number of times the breakpoint will be hit before suspending execution - 0 if it should always suspend
register - whether to add this breakpoint to the breakpoint manager
attributes - a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation, or null if none.
Returns:
a stratum breakpoint
Throws:
CoreException - If this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.
Since:
3.0

createTargetPatternBreakpoint

public static 
IJavaTargetPatternBreakpoint createTargetPatternBreakpoint(
IResource resource,
                                                                         
String sourceName,
                                                                         int lineNumber,
                                                                         int charStart,
                                                                         int charEnd,
                                                                         int hitCount,
                                                                         boolean register,
                                                                         
Map attributes)
                                                                  throws 
CoreException
Creates and returns a target pattern breakpoint for the given resource at the given line number. Clients must set the class name pattern per target for this type of breakpoint. If hitCount > 0, the breakpoint will suspend execution when it is "hit" the specified number of times.

Parameters:
resource - the resource on which to create the associated breakpoint marker
sourceName - the name of the source file in which the breakpoint is set, or null. When specified, the pattern breakpoint will install itself in classes that have a source file name debug attribute that matches this value, and satisfies the class name pattern.
lineNumber - the lineNumber on which the breakpoint is set - line numbers are 1 based, associated with the source file in which the breakpoint is set
charStart - the first character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
charEnd - the last character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
hitCount - the number of times the breakpoint will be hit before suspending execution - 0 if it should always suspend
register - whether to add this breakpoint to the breakpoint manager
attributes - a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation, or null if none.
Returns:
a target pattern breakpoint
Throws:
CoreException - If this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.

createExceptionBreakpoint

public static 
IJavaExceptionBreakpoint createExceptionBreakpoint(
IResource resource,
                                                                 
String exceptionName,
                                                                 boolean caught,
                                                                 boolean uncaught,
                                                                 boolean checked,
                                                                 boolean register,
                                                                 
Map attributes)
                                                          throws 
CoreException
Creates and returns an exception breakpoint for an exception with the given name. The marker associated with the breakpoint will be created on the specified resource. Caught and uncaught specify where the exception should cause thread suspensions - that is, in caught and/or uncaught locations. Checked indicates if the given exception is a checked exception.

Parameters:
resource - the resource on which to create the associated breakpoint marker
exceptionName - the fully qualified name of the exception for which to create the breakpoint
caught - whether to suspend in caught locations
uncaught - whether to suspend in uncaught locations
checked - whether the exception is a checked exception (i.e. compiler detected)
register - whether to add this breakpoint to the breakpoint manager
attributes - a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or null if none.
Returns:
an exception breakpoint
Throws:
CoreException - If this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.
Since:
2.0

createWatchpoint

public static 
IJavaWatchpoint createWatchpoint(
IResource resource,
                                               
String typeName,
                                               
String fieldName,
                                               int lineNumber,
                                               int charStart,
                                               int charEnd,
                                               int hitCount,
                                               boolean register,
                                               
Map attributes)
                                        throws 
CoreException
Creates and returns a watchpoint on a field with the given name in a type with the given name. The marker associated with the breakpoint will be created on the specified resource. If hitCount > 0, the breakpoint will suspend execution when it is "hit" the specified number of times.

Parameters:
resource - the resource on which to create the associated breakpoint marker
typeName - the fully qualified name of the type the breakpoint is to be installed in. If the breakpoint is to be installed in an inner type, it is sufficient to provide the name of the top level enclosing type. If an inner class name is specified, it should be formatted as the associated class file name (i.e. with $). For example, example.SomeClass$InnerType, could be specified, but example.SomeClass is sufficient.
fieldName - the name of the field on which to suspend (on access or modification)
lineNumber - the lineNumber on which the breakpoint is set - line numbers are 1 based, associated with the source file in which the breakpoint is set
charStart - the first character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
charEnd - the last character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
hitCount - the number of times the breakpoint will be hit before suspending execution - 0 if it should always suspend
register - whether to add this breakpoint to the breakpoint manager
attributes - a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation, or null if none.
Returns:
a watchpoint
Throws:
CoreException - If this method fails. Reasons include:
  • Failure creating underlying marker. The CoreException's status contains the underlying exception responsible for the failure.
Since:
2.0

createMethodBreakpoint

public static 
IJavaMethodBreakpoint createMethodBreakpoint(
IResource resource,
                                                           
String typePattern,
                                                           
String methodName,
                                                           
String methodSignature,
                                                           boolean entry,
                                                           boolean exit,
                                                           boolean nativeOnly,
                                                           int lineNumber,
                                                           int charStart,
                                                           int charEnd,
                                                           int hitCount,
                                                           boolean register,
                                                           
Map attributes)
                                                    throws 
CoreException
Creates and returns a method breakpoint with the specified criteria.

Parameters:
resource - the resource on which to create the associated breakpoint marker
typePattern - the pattern specifying the fully qualified name of type(s) this breakpoint suspends execution in. Patterns are limited to exact matches and patterns that begin or end with '*'.
methodName - the name of the method(s) this breakpoint suspends execution in, or null if this breakpoint does not suspend execution based on method name
methodSignature - the signature of the method(s) this breakpoint suspends execution in, or null if this breakpoint does not suspend execution based on method signature
entry - whether this breakpoint causes execution to suspend on entry of methods
exit - whether this breakpoint causes execution to suspend on exit of methods
nativeOnly - whether this breakpoint causes execution to suspend on entry/exit of native methods only
lineNumber - the lineNumber on which the breakpoint is set - line numbers are 1 based, associated with the source file in which the breakpoint is set
charStart - the first character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
charEnd - the last character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
hitCount - the number of times the breakpoint will be hit before suspending execution - 0 if it should always suspend
register - whether to add this breakpoint to the breakpoint manager
attributes - a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation, or null if none.
Returns:
a method breakpoint
Throws:
CoreException - If this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.
Since:
2.0

createMethodEntryBreakpoint

public static 
IJavaMethodEntryBreakpoint createMethodEntryBreakpoint(
IResource resource,
                                                                     
String typeName,
                                                                     
String methodName,
                                                                     
String methodSignature,
                                                                     int lineNumber,
                                                                     int charStart,
                                                                     int charEnd,
                                                                     int hitCount,
                                                                     boolean register,
                                                                     
Map attributes)
                                                              throws 
CoreException
Creates and returns a method entry breakpoint with the specified criteria. A method entry breakpoint will only be installed for methods that have executable code (i.e. will not work for native methods).

Parameters:
resource - the resource on which to create the associated breakpoint marker
typeName - the fully qualified name of type this breakpoint suspends execution in.
methodName - the name of the method this breakpoint suspends execution in
methodSignature - the signature of the method this breakpoint suspends execution in
lineNumber - the lineNumber on which the breakpoint is set - line numbers are 1 based, associated with the source file in which the breakpoint is set
charStart - the first character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
charEnd - the last character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
hitCount - the number of times the breakpoint will be hit before suspending execution - 0 if it should always suspend
register - whether to add this breakpoint to the breakpoint manager
attributes - a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation, or null if none.
Returns:
a method entry breakpoint
Throws:
CoreException - If this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.
Since:
2.0

lineBreakpointExists

public static 
IJavaLineBreakpoint lineBreakpointExists(
String typeName,
                                                       int lineNumber)
                                                throws 
CoreException
Returns a Java line breakpoint that is already registered with the breakpoint manager for a type with the given name at the given line number.

Parameters:
typeName - fully qualified type name
lineNumber - line number
Returns:
a Java line breakpoint that is already registered with the breakpoint manager for a type with the given name at the given line number or null if no such breakpoint is registered
Throws:
CoreException - if unable to retrieve the associated marker attributes (line number).

lineBreakpointExists

public static 
IJavaLineBreakpoint lineBreakpointExists(
IResource resource,
                                                       
String typeName,
                                                       int lineNumber)
                                                throws 
CoreException
Returns a Java line breakpoint that is already registered with the breakpoint manager for a type with the given name at the given line number in the given resource.

Parameters:
resource - the resource
typeName - fully qualified type name
lineNumber - line number
Returns:
a Java line breakpoint that is already registered with the breakpoint manager for a type with the given name at the given line number or null if no such breakpoint is registered
Throws:
CoreException - if unable to retrieve the associated marker attributes (line number).
Since:
3.1

getPreferences

public static 
Preferences getPreferences()
Returns the preference store for this plug-in or null if the store is not available.

Returns:
the preference store for this plug-in
Since:
2.0

savePreferences

public static void savePreferences()
Saves the preference store for this plug-in.

Since:
2.0

createClassPrepareBreakpoint

public static 
IJavaClassPrepareBreakpoint createClassPrepareBreakpoint(
IResource resource,
                                                                       
String typeName,
                                                                       int memberType,
                                                                       int charStart,
                                                                       int charEnd,
                                                                       boolean register,
                                                                       
Map attributes)
                                                                throws 
CoreException
Creates and returns a class prepare breakpoint for a type with the given name. The marker associated with the breakpoint will be created on the specified resource.

Parameters:
resource - the resource on which to create the associated breakpoint marker
typeName - the fully qualified name of the type for which to create the breakpoint
memberType - one of TYPE_CLASS or TYPE_INTERFACE
charStart - the first character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
charEnd - the last character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
register - whether to add this breakpoint to the breakpoint manager
attributes - a map of client defined attributes that should be assigned to the underlying breakpoint marker on creation or null if none.
Returns:
a class prepare breakpoint
Throws:
CoreException - If this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.
Since:
3.0

Eclipse JDT
Release 3.5

Copyright (c) IBM Corp. and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire