axel/src/main/java/fr/xgouchet/xmleditor/core/model/TreeNode.java
void updateDepthRecursive() {
        int oldDepth = mDepth;

        if (mParent == null) {
            mDepth = 0;
        } else {
            mDepth = mParent.getDepth() + 1;
        }

        if (oldDepth != mDepth) {
            for (TreeNode<T> child : mChildren) {
                child.updateDepthRecursive();
            }
        }
    }
/**
     * Updates (recursively) the depth of this node and its children. This should only be triggered
     * when the parent of this node changes
     */
Updates (recursively) the depth of this node and its children. This should only be triggered
when the parent of this node changes
Updates ( recursively ) the depth of this node and its children . This should only be triggered when the parent of this node changes
void updateDepthRecursive() {
        int oldDepth = mDepth;
        if (mParent == null) {
            mDepth = 0;
        } else {
            mDepth = mParent.getDepth() + 1;
        }
        if (oldDepth != mDepth) {
            for (TreeNode<T> child : mChildren) {
                child.updateDepthRecursive();
            }
        }
    }
void updateDepthRecursive ( ) { int oldDepth = mDepth ; if ( mParent == null ) { mDepth = 0 ; } else { mDepth = mParent . getDepth ( ) + 1 ; } if ( oldDepth != mDepth ) { for ( TreeNode < T > child : mChildren ) { child . updateDepthRecursive ( ) ; } } }
Updates (recursively) the depth of this node and its children.
Updates ( recursively ) the depth of this node and its children .