public abstract class JSR45PositionManager<Scope> extends java.lang.Object implements PositionManager
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
GENERATED_CLASS_PATTERN |
protected DebugProcess |
myDebugProcess |
protected java.util.regex.Matcher |
myGeneratedClassPatternMatcher |
protected Scope |
myScope |
protected SourcesFinder<Scope> |
mySourcesFinder |
| Constructor and Description |
|---|
JSR45PositionManager(DebugProcess debugProcess,
Scope scope,
java.lang.String stratumId,
LanguageFileType[] acceptedFileTypes,
SourcesFinder<Scope> sourcesFinder) |
| Modifier and Type | Method and Description |
|---|---|
com.sun.jdi.request.ClassPrepareRequest |
createPrepareRequest(ClassPrepareRequestor requestor,
SourcePosition position)
Called to request the JVM to notify the debugger engine when a class corresponding to a breakpoint location is loaded.
|
java.util.Set<LanguageFileType> |
getAcceptedFileTypes()
Return file types this position manager accepts
|
java.util.List<com.sun.jdi.ReferenceType> |
getAllClasses(SourcePosition classPosition)
Returns the list of all Java classes corresponding to the specified position in the source code.
|
protected java.lang.String |
getGeneratedClassesNamePattern() |
protected abstract java.lang.String |
getGeneratedClassesPackage() |
protected int |
getLineNumber(com.sun.jdi.Location location) |
protected java.util.List<com.sun.jdi.Location> |
getLocationsOfLine(com.sun.jdi.ReferenceType type,
java.lang.String fileName,
java.lang.String relativePath,
int lineNumber) |
protected java.lang.String |
getRelativePath(java.lang.String sourcePath) |
protected java.lang.String |
getRelativeSourcePathByLocation(com.sun.jdi.Location location) |
protected java.util.List<java.lang.String> |
getRelativeSourePathsByType(com.sun.jdi.ReferenceType type) |
SourcePosition |
getSourcePosition(com.sun.jdi.Location location)
Returns the source position corresponding to the specified bytecode location.
|
java.lang.String |
getStratumId() |
java.util.List<com.sun.jdi.Location> |
locationsOfLine(com.sun.jdi.ReferenceType type,
SourcePosition position)
Returns the list of bytecode locations in a specific class corresponding to the specified position in the source code.
|
protected void |
onClassPrepare(DebugProcess debuggerProcess,
com.sun.jdi.ReferenceType referenceType,
SourcePosition position,
ClassPrepareRequestor requestor) |
protected final DebugProcess myDebugProcess
protected final Scope myScope
protected final SourcesFinder<Scope> mySourcesFinder
protected final java.lang.String GENERATED_CLASS_PATTERN
protected java.util.regex.Matcher myGeneratedClassPatternMatcher
public JSR45PositionManager(DebugProcess debugProcess, Scope scope, java.lang.String stratumId, LanguageFileType[] acceptedFileTypes, SourcesFinder<Scope> sourcesFinder)
protected abstract java.lang.String getGeneratedClassesPackage()
protected java.lang.String getGeneratedClassesNamePattern()
public final java.lang.String getStratumId()
public SourcePosition getSourcePosition(com.sun.jdi.Location location) throws NoDataException
PositionManagergetSourcePosition in interface PositionManagerlocation - the bytecode location.NoDataException - if the location is not in the code managed by this PositionManagerprotected java.lang.String getRelativeSourcePathByLocation(com.sun.jdi.Location location)
throws com.sun.jdi.AbsentInformationException
com.sun.jdi.AbsentInformationExceptionprotected int getLineNumber(com.sun.jdi.Location location)
public java.util.List<com.sun.jdi.ReferenceType> getAllClasses(SourcePosition classPosition) throws NoDataException
PositionManagergetAllClasses in interface PositionManagerclassPosition - the source position.NoDataException - if the location is not in the code managed by this PositionManagerVirtualMachineProxy.classesByName(java.lang.String)public java.util.Set<LanguageFileType> getAcceptedFileTypes()
PositionManagergetAcceptedFileTypes in interface PositionManagerpublic java.util.List<com.sun.jdi.Location> locationsOfLine(com.sun.jdi.ReferenceType type,
SourcePosition position)
throws NoDataException
PositionManagerlocationsOfLine in interface PositionManagertype - a Java class (one of the list returned by PositionManager.getAllClasses(com.intellij.debugger.SourcePosition)).position - the position in the source code.NoDataException - if the location is not in the code managed by this PositionManagerReferenceType.locationsOfLine(int)protected java.util.List<java.lang.String> getRelativeSourePathsByType(com.sun.jdi.ReferenceType type)
throws com.sun.jdi.AbsentInformationException
com.sun.jdi.AbsentInformationExceptionprotected java.util.List<com.sun.jdi.Location> getLocationsOfLine(com.sun.jdi.ReferenceType type,
java.lang.String fileName,
java.lang.String relativePath,
int lineNumber)
throws com.sun.jdi.AbsentInformationException
com.sun.jdi.AbsentInformationExceptionpublic com.sun.jdi.request.ClassPrepareRequest createPrepareRequest(ClassPrepareRequestor requestor, SourcePosition position) throws NoDataException
PositionManagerRequestManager.createClassPrepareRequest(com.intellij.debugger.requests.ClassPrepareRequestor, java.lang.String) to create the request.createPrepareRequest in interface PositionManagerrequestor - the object to receive the notification from the JVM.position - the location of a breakpoint.PositionManager but no class prepare notification is neededNoDataException - if the position is not in the code managed by this PositionManagerprotected void onClassPrepare(DebugProcess debuggerProcess, com.sun.jdi.ReferenceType referenceType, SourcePosition position, ClassPrepareRequestor requestor)
protected java.lang.String getRelativePath(java.lang.String sourcePath)