IDEA-125322 Debugger: F2 adds new row in Watches

This commit is contained in:
Egor.Ushakov
2014-10-28 13:53:58 +03:00
parent 47e081e201
commit 3699912a7a
2 changed files with 4 additions and 0 deletions
@@ -66,6 +66,7 @@ public class WatchInplaceEditor extends XDebuggerTreeInplaceEditor {
if (myOldNode != null && index != -1) {
myWatchesView.addWatchExpression(myOldNode.getExpression(), index, false);
}
getTree().setSelectionRow(index);
}
@Override
@@ -77,6 +78,7 @@ public class WatchInplaceEditor extends XDebuggerTreeInplaceEditor {
if (!XDebuggerUtilImpl.isEmptyExpression(expression) && index != -1) {
myWatchesView.addWatchExpression(expression, index, false);
}
getTree().setSelectionRow(index);
}
@Override
@@ -106,6 +106,7 @@ public class WatchesRootNode extends XDebuggerTreeNode {
}
private void replaceNode(final WatchNode oldNode, final WatchNode newNode) {
int[] selectedRows = getTree().getSelectionRows();
for (int i = 0; i < myChildren.size(); i++) {
WatchNode child = myChildren.get(i);
if (child == oldNode) {
@@ -118,6 +119,7 @@ public class WatchesRootNode extends XDebuggerTreeNode {
else {
fireNodeStructureChanged(newNode);
}
getTree().setSelectionRows(selectedRows);
return;
}
}