void (AnActionEvent e) { final Project project = e.getProject(); final TypeInfo selectedClass = getSelectedClass(e); if (project != null && selectedClass != null) { final XDebugSession debugSession = DebuggerUIUtil.getSession(e); if (debugSession != null) { new InstancesWindow(debugSession, selectedClass::getInstances, ((JavaTypeInfo)selectedClass).getReferenceType()).show(); } } }