public void setTreeState(TreeState treeState) {
    if (treeState == null) {
      TreeUtil.expandAll(patternTree);
    }
    else {
      treeState.applyTo(patternTree);
    }
  }
public void setTreeState(TreeState treeState)