use of com.intellij.debugger.memory.utils.InstancesProvider 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.utils.InstancesProvider 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