public override ModelTreeNode CreateDefaultItem()
        {
            var item = new Class();
            var node = new ClassTreeNode(item);

            return(node);
        }
        public override IList <ModelTreeNode> CreateTree()
        {
            var root  = new ClassTreeNode();
            var nodes = new List <ClassTreeNode>()
            {
                root
            };

            return(nodes.Cast <ModelTreeNode>().ToList());
        }
        public override IList <ModelTreeNode> LoadTree(string path)
        {
            var folderTreeNode = new FolderTreeNode();
            var directory      = Path.GetDirectoryName(path);
            var classPaths     = Directory.EnumerateFiles(directory, "*.class");

            folderTreeNode.Text = directory;

            foreach (var classPath in classPaths)
            {
                var json      = File.ReadAllText(classPath);
                var item      = JsonConvert.DeserializeObject <Class>(json);
                var classNode = new ClassTreeNode(item);

                folderTreeNode.AddChild(classNode);
            }

            return(new List <ModelTreeNode>()
            {
                folderTreeNode
            });
        }