use of com.intellij.debugger.requests.ClassPrepareRequestor in project smali by JesusFreke.
the class SmaliPositionManager method createPrepareRequest.
@Override
public ClassPrepareRequest createPrepareRequest(@NotNull final ClassPrepareRequestor requestor, @NotNull final SourcePosition position) throws NoDataException {
Computable<Boolean> isSmaliFile = new Computable<Boolean>() {
@Override
public Boolean compute() {
return position.getFile() instanceof SmaliFile;
}
};
ApplicationManager.getApplication().runReadAction(isSmaliFile);
if (!isSmaliFile.compute()) {
throw NoDataException.INSTANCE;
}
String className = getClassFromPosition(position);
return debugProcess.getRequestsManager().createClassPrepareRequest(new ClassPrepareRequestor() {
@Override
public void processClassPrepare(DebugProcess debuggerProcess, ReferenceType referenceType) {
requestor.processClassPrepare(debuggerProcess, referenceType);
}
}, className);
}
use of com.intellij.debugger.requests.ClassPrepareRequestor 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