use of com.sun.jdi.ReferenceType 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.sun.jdi.ReferenceType in project intellij-community by JetBrains.
the class ShowInstancesFromClassesViewAction method perform.
@Override
protected void perform(AnActionEvent e) {
final Project project = e.getProject();
final ReferenceType selectedClass = getSelectedClass(e);
if (project != null && selectedClass != null) {
final XDebugSession debugSession = XDebuggerManager.getInstance(project).getCurrentSession();
if (debugSession != null) {
new InstancesWindow(debugSession, limit -> selectedClass.instances(limit), selectedClass.name()).show();
}
}
}
use of com.sun.jdi.ReferenceType in project intellij-community by JetBrains.
the class ShowInstancesFromClassesViewAction method getInstancesCount.
@Override
protected int getInstancesCount(AnActionEvent e) {
ClassesTable.ReferenceCountProvider countProvider = e.getData(ClassesTable.REF_COUNT_PROVIDER_KEY);
ReferenceType selectedClass = getSelectedClass(e);
if (countProvider == null || selectedClass == null) {
return -1;
}
return countProvider.getTotalCount(selectedClass);
}
use of com.sun.jdi.ReferenceType in project intellij-community by JetBrains.
the class ShowNewInstancesAction method perform.
@Override
protected void perform(AnActionEvent e) {
final Project project = e.getProject();
final ReferenceType selectedClass = getSelectedClass(e);
final InstancesProvider provider = e.getData(ClassesTable.NEW_INSTANCES_PROVIDER_KEY);
final XDebugSession session = project != null ? XDebuggerManager.getInstance(project).getCurrentSession() : null;
if (selectedClass != null && provider != null && session != null) {
new InstancesWindow(session, provider, selectedClass.name()).show();
}
}
use of com.sun.jdi.ReferenceType in project intellij-community by JetBrains.
the class ShowNewInstancesAction method isEnabled.
@Override
protected boolean isEnabled(AnActionEvent e) {
final ReferenceType selectedClass = getSelectedClass(e);
final InstancesProvider provider = e.getData(ClassesTable.NEW_INSTANCES_PROVIDER_KEY);
final int count = getInstancesCount(e);
return super.isEnabled(e) && selectedClass != null && provider != null && count > 0;
}
Aggregations