use of com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl in project intellij-community by JetBrains.
the class JavaMarkObjectActionHandler method isMarked.
@Override
public boolean isMarked(@NotNull Project project, @NotNull AnActionEvent event) {
final DebuggerTreeNodeImpl node = DebuggerAction.getSelectedNode(event.getDataContext());
if (node == null)
return false;
final NodeDescriptorImpl descriptor = node.getDescriptor();
if (!(descriptor instanceof ValueDescriptor))
return false;
DebugProcess debugProcess = node.getTree().getDebuggerContext().getDebugProcess();
return ((ValueDescriptor) descriptor).getMarkup(debugProcess) != null;
}
use of com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl in project intellij-community by JetBrains.
the class ResumeThreadAction method update.
public void update(AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNodes = getSelectedNodes(e.getDataContext());
boolean visible = false;
boolean enabled = false;
String text = DebuggerBundle.message("action.resume.thread.text.resume");
if (selectedNodes != null && selectedNodes.length > 0) {
visible = true;
enabled = true;
for (DebuggerTreeNodeImpl selectedNode : selectedNodes) {
final NodeDescriptorImpl threadDescriptor = selectedNode.getDescriptor();
if (!(threadDescriptor instanceof ThreadDescriptorImpl) || !((ThreadDescriptorImpl) threadDescriptor).isSuspended()) {
visible = false;
break;
}
}
}
final Presentation presentation = e.getPresentation();
presentation.setText(text);
presentation.setVisible(visible);
presentation.setEnabled(enabled);
}
use of com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl in project android by JetBrains.
the class InstancesTreeView method getTargetFiles.
@Nullable
private PsiClassNavigation[] getTargetFiles() {
Object node = myDebuggerTree.getSelectionPath().getLastPathComponent();
String className = null;
if (node instanceof DebuggerTreeNodeImpl) {
NodeDescriptorImpl nodeDescriptor = ((DebuggerTreeNodeImpl) node).getDescriptor();
if (nodeDescriptor instanceof InstanceFieldDescriptorImpl) {
Instance instance = ((InstanceFieldDescriptorImpl) nodeDescriptor).getInstance();
if (instance != null) {
if (instance instanceof ClassObj) {
className = ((ClassObj) instance).getClassName();
} else {
className = instance.getClassObj().getClassName();
if (instance instanceof ArrayInstance) {
className = className.replace("[]", "");
}
}
}
}
}
return PsiClassNavigation.getNavigationForClass(myProject, className);
}
Aggregations