use of com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl in project intellij-community by JetBrains.
the class ViewTextAction method getStringNode.
private static XValueNodeImpl getStringNode(@NotNull AnActionEvent e) {
List<XValueNodeImpl> selectedNodes = XDebuggerTreeActionBase.getSelectedNodes(e.getDataContext());
if (selectedNodes.size() == 1) {
XValueNodeImpl node = selectedNodes.get(0);
XValue container = node.getValueContainer();
if (container instanceof JavaValue && ((JavaValue) container).getDescriptor().isString() && container.getModifier() != null) {
return node;
}
}
return null;
}
use of com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl 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();
}
}
}
use of com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl in project intellij-community by JetBrains.
the class AdjustArrayRangeAction method update.
@Override
public void update(AnActionEvent e) {
boolean enable = false;
XValueNodeImpl node = XDebuggerTreeActionBase.getSelectedNode(e.getDataContext());
if (node != null) {
XValue container = node.getValueContainer();
if (container instanceof JavaValue) {
ValueDescriptorImpl descriptor = ((JavaValue) container).getDescriptor();
enable = getArrayRenderer(descriptor) != null;
}
}
e.getPresentation().setVisible(enable);
}
use of com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl in project intellij-community by JetBrains.
the class XJumpToSourceActionBase method perform.
@Override
protected void perform(final XValueNodeImpl node, @NotNull final String nodeName, final AnActionEvent e) {
XValue value = node.getValueContainer();
final XDebuggerEvaluationDialog dialog = e.getData(XDebuggerEvaluationDialog.KEY);
XNavigatable navigatable = sourcePosition -> {
if (sourcePosition != null) {
final Project project = node.getTree().getProject();
AppUIUtil.invokeOnEdt(() -> {
sourcePosition.createNavigatable(project).navigate(true);
if (dialog != null && Registry.is("debugger.close.dialog.on.navigate")) {
dialog.close(DialogWrapper.CANCEL_EXIT_CODE);
}
}, project.getDisposed());
}
};
startComputingSourcePosition(value, navigatable);
}
use of com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl in project intellij-community by JetBrains.
the class XSetValueAction method update.
@Override
public void update(final AnActionEvent e) {
super.update(e);
XValueNodeImpl node = getSelectedNode(e.getDataContext());
Presentation presentation = e.getPresentation();
if (node instanceof WatchNode) {
presentation.setVisible(false);
presentation.setEnabled(false);
} else {
presentation.setVisible(true);
}
}
Aggregations