use of com.intellij.debugger.memory.ui.InstancesWindow 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.intellij.debugger.memory.ui.InstancesWindow 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.intellij.debugger.memory.ui.InstancesWindow in project intellij-community by JetBrains.
the class ShowInstancesByClassAction method perform.
@Override
protected void perform(XValueNodeImpl node, @NotNull String nodeName, AnActionEvent e) {
final Project project = e.getProject();
if (project != null) {
final XDebugSession debugSession = XDebuggerManager.getInstance(project).getCurrentSession();
final ObjectReference ref = getObjectReference(node);
if (debugSession != null && ref != null) {
final ReferenceType referenceType = ref.referenceType();
new InstancesWindow(debugSession, l -> {
final List<ObjectReference> instances = referenceType.instances(l);
return instances == null ? Collections.emptyList() : instances;
}, referenceType.name()).show();
}
}
}
Aggregations