void (TreeNode node, final CodeStyleSettings settings) { if (node instanceof MyToggleTreeNode) { resetMyTreeNode((MyToggleTreeNode)node, settings); return; } for (int j = 0; j < node.getChildCount(); j++) { TreeNode child = node.getChildAt(j); resetNode(child, settings); } }