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