use of com.intellij.debugger.engine.CompoundPositionManager in project intellij-community by JetBrains.
the class GroovyPositionManager method createPrepareRequest.
@Override
public ClassPrepareRequest createPrepareRequest(@NotNull final ClassPrepareRequestor requestor, @NotNull final SourcePosition position) throws NoDataException {
if (LOG.isDebugEnabled()) {
LOG.debug("createPrepareRequest: " + position);
}
checkGroovyFile(position);
String qName = getOuterClassName(position);
if (qName != null) {
return myDebugProcess.getRequestsManager().createClassPrepareRequest(requestor, qName);
}
qName = findEnclosingName(position);
if (qName == null)
throw NoDataException.INSTANCE;
ClassPrepareRequestor waitRequestor = new ClassPrepareRequestor() {
@Override
public void processClassPrepare(DebugProcess debuggerProcess, ReferenceType referenceType) {
final CompoundPositionManager positionManager = ((DebugProcessImpl) debuggerProcess).getPositionManager();
if (!positionManager.locationsOfLine(referenceType, position).isEmpty()) {
requestor.processClassPrepare(debuggerProcess, referenceType);
}
}
};
return myDebugProcess.getRequestsManager().createClassPrepareRequest(waitRequestor, qName + "$*");
}
Aggregations