public override void OnInspectorGUI()
        {
            switch (_state)
            {
            case StateGenerate.None:
            {
                if (GUILayout.Button("Create"))
                {
                    _state = StateGenerate.ChooseType;
                }
                if (GUILayout.Button("Check"))
                {
                    AssemblyReflectionHelper.GetAllTypesInSolution <DataBox>().Where(t => !t.IsAbstract && !t.IsGenericType).ForEach(t =>
                        {
                            CreateAsset(t);
                        });
                    _allProviders = AssemblyReflectionHelper.AllDataBox().ToList();
                    RefreshView();
                }
                break;
            }

            case StateGenerate.ChooseType:
                EditorGUILayout.BeginVertical();
                DrawChooseType();
                EditorGUILayout.EndVertical();
                break;

            case StateGenerate.Generating:
            {
                _allGenerators.ForEach(g => g.Generate());
                AssetDatabase.Refresh();
                _state = StateGenerate.None;
                break;
            }
            }

            base.OnInspectorGUI();

            if (GUILayout.Button("Set generate settings"))
            {
                foreach (var dataBox in AssemblyReflectionHelper.AllDataBox())
                {
                    Debug.Log(dataBox.ObjectType.Name);
                }
                //   SetPathesWindow.ShowSetPathWindow();
            }
        }
        private static Dictionary <Type, Type> GetAll <T>() where T : BaseEditorStatic
        {
            var res = new Dictionary <Type, Type>();

            AssemblyReflectionHelper.GetAllTypesInSolution <T>().ForEach(t =>
            {
                var attr = t.GetCustomAttributes(typeof(ViewWrapperAttribute), false);
                if (attr.Length <= 0)
                {
                    return;
                }
                var atr = attr[0] as ViewWrapperAttribute;
                res.Add(atr.WrapperType, t);
            });
            return(res);
        }
        private void Init()
        {
            var allTypes = AssemblyReflectionHelper.GetAllTypesInSolution <DataObject>(true).ToList();

            _state     = StateGenerate.None;
            _namesType = new string[allTypes.Count];
            _dicTypes  = new Dictionary <int, Type>();
            for (var i = 0; i < allTypes.Count; i++)
            {
                _namesType[i] = allTypes[i].Name;
                _dicTypes.Add(i, allTypes[i]);
            }

            _parentType = typeof(DataObject);
            ChooseIndex = _dicTypes.FirstOrDefault(o => o.Value == _parentType).Key;

            _allGenerators = new List <CodeGenerators> {
                new DataGenerator(), new ProviderGenerator()
            };
            _IsInited = true;
        }