protected override void InitData()
        {
            WindowConfigSource = FileConfigSource.CreateFileConfigSource("ViewConfig/TestWindow/config4.txt", true, typeof(FolderTreeViewTestWindowConfig));

            m_FolderTreeViewGroup        = new FolderTreeViewGroup(m_LayoutGroupMgr, WindowConfigSource, "TreeViewStateConfig", "TreeViewDataContainer");
            m_FolderTreeViewGroup.Active = false;

            m_DataContainer          = m_FolderTreeViewGroup.GetDataContainer();
            m_DataContainer.ExtNames = ExtNames;
            m_DataContainer.UpdateValidItems();

            m_TreeView = m_FolderTreeViewGroup.GetTreeView();
            m_TreeView.useExpansionAnimation            = true;
            m_TreeView.deselectOnUnhandledMouseDown     = true;
            m_TreeView.contextClickItemCallback         = ContextClickItemCallback;
            m_TreeView.contextClickOutsideItemsCallback = ContextClickOutsideItemsCallback;

            m_LayoutGroupMgr.AddViewGroup(m_FolderTreeViewGroup);

            m_TipsViewGroup             = new TipsViewGroup(m_LayoutGroupMgr);
            m_TipsViewGroup.Active      = false;
            m_TipsViewGroup.TipStr      = "当前根目录路径不存在,请配置根目录路径";
            m_TipsViewGroup.DrawAction += () =>
            {
                EditorGUILayout.BeginHorizontal();
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("选择目录"))
                {
                    var path = EditorUtility.OpenFolderPanel("选择目录", "", "");
                    if (!string.IsNullOrEmpty(path))
                    {
                        if (m_DataContainer.RootFolderPath != path)
                        {
                            m_DataContainer.RootFolderPath = path;
                            m_TreeView.state.expandedIDs   = new List <int>();
                            m_TreeView.state.selectedIDs   = new List <int>();
                            m_TreeView.state.lastClickedID = Int32.MinValue;
                            m_TreeView.state.scrollPos     = Vector2.zero;
                            if (m_TreeView.data != null)
                            {
                                m_TreeView.data.ReloadData();
                            }
                            WindowConfigSource.SetConfigDirty();
                            WindowConfigSource.SaveConfigLazily();
                        }
                    }
                }
                GUILayout.FlexibleSpace();
                EditorGUILayout.EndHorizontal();
            };
            m_LayoutGroupMgr.AddViewGroup(m_TipsViewGroup);
            CheckViewVisible();
        }
 public FolderTreeItemContainer GetDataContainer()
 {
     return(m_FolderTreeViewGroup.GetDataContainer());
 }