Alexander Wels has posted comments on this change.

Change subject: webadmin: expand all expands selected node
......................................................................


Patch Set 1: (6 inline comments)

....................................................
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/tree/SystemTree.java
Line 122:     }
Line 123: 
Line 124:     private void collapseTree(TreeNode node) {
Line 125:         TreeNode parent = node.getParent();
Line 126:         if(parent == null) {
I will fix them, the thing is if I let my IDE format the file, it keeps 
changing a whole bunch of lines, and then people complain I am changing the 
formatting. So I am trying see how much I change when I do the formatting, and 
I think with this file there were a lot of changes, so I didn't run the 
formatter. But I will fix it.
Line 127:             node.setChildOpen(0, false);
Line 128:         } else {
Line 129:             parent.setChildOpen(node.getIndex(), false);
Line 130:         }


Line 131:     }
Line 132: 
Line 133:     private TreeNode findNode(TreeNode node, SystemTreeItemModel 
model) {
Line 134:         TreeNode result = null;
Line 135:         if(node == null) {
Done
Line 136:             return null;
Line 137:         }
Line 138: 
Line 139:         int i = 0;


Line 135:         if(node == null) {
Line 136:             return null;
Line 137:         }
Line 138: 
Line 139:         int i = 0;
Because I can iterate over the entire list without finding what I am looking 
for, and then I need the counter to stop the loop.
Line 140:         while(result == null && i < node.getChildCount()) {
Line 141:             if(null != model && model.equals(node.getChildValue(i))) {
Line 142:                 result = node.setChildOpen(i, true);
Line 143:                 break;


Line 136:             return null;
Line 137:         }
Line 138: 
Line 139:         int i = 0;
Line 140:         while(result == null && i < node.getChildCount()) {
Done
Line 141:             if(null != model && model.equals(node.getChildValue(i))) {
Line 142:                 result = node.setChildOpen(i, true);
Line 143:                 break;
Line 144:             }


Line 137:         }
Line 138: 
Line 139:         int i = 0;
Line 140:         while(result == null && i < node.getChildCount()) {
Line 141:             if(null != model && model.equals(node.getChildValue(i))) {
Habits die hard. Will fix it.
Line 142:                 result = node.setChildOpen(i, true);
Line 143:                 break;
Line 144:             }
Line 145:             //Only check open nodes, otherwise they couldn't have 
been selected.


Line 142:                 result = node.setChildOpen(i, true);
Line 143:                 break;
Line 144:             }
Line 145:             //Only check open nodes, otherwise they couldn't have 
been selected.
Line 146:             if(node.isChildOpen(i)) {
Done
Line 147:                 result = findNode(node.setChildOpen(i, true), model);
Line 148:             }
Line 149:             i++;
Line 150:         }


--
To view, visit http://gerrit.ovirt.org/10913
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I110efdff51be6e5545a1de304bdce657ec5cda88
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to