void (DefaultTreeModel treeModel) { boolean autoScrollWasEnabled = myAutoScrollEnabled; try { myAutoScrollEnabled = false; ModuleGroupingTreeHelper<Module, MyNode> helper = createGroupingHelper(Predicate.isEqual(this)); MyNode newNode = helper.moveModuleNodeToProperGroup(this, getModule(), myRoot, treeModel, myTree); treeModel.reload(newNode); } finally { myAutoScrollEnabled = autoScrollWasEnabled; } }