boolean (TreeNode node, final CodeStyleSettings settings) { if (node instanceof MyToggleTreeNode) { if (isToggleNodeModified((MyToggleTreeNode)node, settings)) { return true; } } for (int j = 0; j < node.getChildCount(); j++) { TreeNode child = node.getChildAt(j); if (isModified(child, settings)) { return true; } } return false; }