use of com.intellij.xdebugger.impl.ui.tree.XDebuggerTree in project intellij-community by JetBrains.
the class DebuggerUIUtil method setTreeNodeValue.
public static void setTreeNodeValue(XValueNodeImpl valueNode, String text, Consumer<String> errorConsumer) {
XDebuggerTree tree = valueNode.getTree();
Project project = tree.getProject();
XValueModifier modifier = valueNode.getValueContainer().getModifier();
if (modifier == null)
return;
XDebuggerTreeState treeState = XDebuggerTreeState.saveState(tree);
valueNode.setValueModificationStarted();
modifier.setValue(text, new XValueModifier.XModificationCallback() {
@Override
public void valueModified() {
if (tree.isDetached()) {
AppUIUtil.invokeOnEdt(() -> tree.rebuildAndRestore(treeState));
}
XDebuggerUtilImpl.rebuildAllSessionsViews(project);
}
@Override
public void errorOccurred(@NotNull final String errorMessage) {
AppUIUtil.invokeOnEdt(() -> {
tree.rebuildAndRestore(treeState);
errorConsumer.consume(errorMessage);
});
XDebuggerUtilImpl.rebuildAllSessionsViews(project);
}
});
}
use of com.intellij.xdebugger.impl.ui.tree.XDebuggerTree in project intellij-community by JetBrains.
the class ShowReferringObjectsAction method perform.
@Override
protected void perform(XValueNodeImpl node, @NotNull String nodeName, AnActionEvent e) {
XReferrersProvider referrersProvider = node.getValueContainer().getReferrersProvider();
if (referrersProvider != null) {
XDebuggerTree tree = node.getTree();
XDebugSession session = XDebuggerManager.getInstance(tree.getProject()).getCurrentSession();
if (session != null) {
XInspectDialog dialog = new XInspectDialog(tree.getProject(), tree.getEditorsProvider(), tree.getSourcePosition(), nodeName, referrersProvider.getReferringObjectsValue(), tree.getValueMarkers(), session, false);
dialog.setTitle(XDebuggerBundle.message("showReferring.dialog.title", nodeName));
dialog.show();
}
}
}
use of com.intellij.xdebugger.impl.ui.tree.XDebuggerTree in project intellij-community by JetBrains.
the class XDebuggerTreeActionBase method getSelectedNode.
@Nullable
public static XValueNodeImpl getSelectedNode(final DataContext dataContext) {
XDebuggerTree tree = XDebuggerTree.getTree(dataContext);
if (tree == null)
return null;
TreePath path = tree.getSelectionPath();
if (path == null)
return null;
Object node = path.getLastPathComponent();
return node instanceof XValueNodeImpl ? (XValueNodeImpl) node : null;
}
use of com.intellij.xdebugger.impl.ui.tree.XDebuggerTree in project intellij-community by JetBrains.
the class XInspectAction method perform.
@Override
protected void perform(XValueNodeImpl node, @NotNull final String nodeName, AnActionEvent e) {
XDebuggerTree tree = node.getTree();
XValue value = node.getValueContainer();
XInspectDialog dialog = new XInspectDialog(tree.getProject(), tree.getEditorsProvider(), tree.getSourcePosition(), nodeName, value, tree.getValueMarkers(), XDebuggerManager.getInstance(tree.getProject()).getCurrentSession(), true);
dialog.show();
}
Aggregations