Exemplo n.º 1
0
 /*!
  * \breif Load doxySettings from the UserDoxyFile of ot exist.
  *
  * If The user doxy file do not exist load from editor pref. or
  * as last restort default.
  */
 void OnEnable()
 {
     _doxySettings.Load();
     if (DoxyFile.DoxygenFileExist(DoxyType.User, _doxySettings))
     {
         _msgToUser = "******";
     }
     else
     {
         _msgToUser = "******";
     }
 }
Exemplo n.º 2
0
        /*!
         * \brief The settings tab
         */
        private void SettingGUI()
        {
            if (GUILayout.Button("Save settings (and build DoxyFile if needed)", EditorStyles.miniButton))
            {
                _doxySettings.Save();
                int madeDoxy = DoxyFile.MakeTheDoxyFiles(_doxySettings);
                if (2 == madeDoxy)
                {
                    _msgToUser = "******";
                }
                else if (1 == madeDoxy)
                {
                    _msgToUser = "******";
                }
                else
                {
                    _msgToUser = "******";
                }
            }


            //Documentation directory
            GUILayout.Space(10);
            GUILayout.Label("The path to the active documentation folder", EditorStyles.wordWrappedLabel);
            GUILayout.BeginHorizontal();
            _doxySettings.activeDocumentationFolder = EditorGUILayout.TextField("Documentation : ", _doxySettings.activeDocumentationFolder);
            if (GUILayout.Button("...", EditorStyles.miniButtonRight, GUILayout.Width(22)))
            {
                _doxySettings.activeDocumentationFolder = EditorUtility.OpenFolderPanel("Choose the documentation folder", _doxySettings.activeDocumentationFolder, "");
                if ("" != _doxySettings.activeDocumentationFolder)
                {
                    string userDoxyFile = _doxySettings.activeDocumentationFolder + "/UserDoxyfile";
                    if (File.Exists(userDoxyFile))
                    {
                        _doxySettings.LoadSettingsFromUserDoxyFile();
                    }
                }
            }
            GUILayout.EndHorizontal();

            //Reload doxygen file
            if (GUILayout.Button("Reload settings from UserDoxygen file", EditorStyles.miniButton))
            {
                _doxySettings.LoadSettingsFromUserDoxyFile();
                if (DoxyFile.DoxygenFileExist(DoxyType.User, _doxySettings))
                {
                    _msgToUser = "******";
                }
                else
                {
                    _msgToUser = "******";
                }
            }

            //Doxy file settings
            GUILayout.Space(10);
            GUILayout.Label("The following settings is loaded \nfrom UserDoxyfile if doxyfile exist!", EditorStyles.boldLabel);

            //Doxy project settings
            GUILayout.Label("Provide some details about the project to be inserted in the doxyfile", EditorStyles.wordWrappedLabel);
            _doxySettings.projectName          = EditorGUILayout.TextField("Project Name: ", _doxySettings.projectName);
            _doxySettings.projectBrief         = EditorGUILayout.TextField("Short Description: ", _doxySettings.projectBrief);
            _doxySettings.projectVersionNumber = EditorGUILayout.TextField("Version: ", _doxySettings.projectVersionNumber);

            //Doxy path
            GUILayout.Space(10);
            GUILayout.Label("The path to doxygen.exe", EditorStyles.wordWrappedLabel);
            EditorGUILayout.BeginHorizontal();
            _doxySettings.fullDoxygenPath = EditorGUILayout.TextField("Doxygen.exe : ", _doxySettings.fullDoxygenPath);
            if (GUILayout.Button("...", EditorStyles.miniButtonRight, GUILayout.Width(22)))
            {
                _doxySettings.fullDoxygenPath = EditorUtility.OpenFilePanel("Where is doxygen.exe installed?", _doxySettings.fullDoxygenPath, "");
            }
            EditorGUILayout.EndHorizontal();

            //Sours directory
            GUILayout.Label("This settings is only used \nif new doxy file is created!", EditorStyles.boldLabel);
            GUILayout.Space(10);
            GUILayout.Label("The path to root of the source", EditorStyles.wordWrappedLabel);
            EditorGUILayout.BeginHorizontal();
            _doxySettings.projecSourceFolder = EditorGUILayout.TextField("Source : ", _doxySettings.projecSourceFolder);
            if (GUILayout.Button("...", EditorStyles.miniButtonRight, GUILayout.Width(22)))
            {
                _doxySettings.projecSourceFolder = EditorUtility.OpenFolderPanel("Choose the root of the source", _doxySettings.projecSourceFolder, "");
            }
            EditorGUILayout.EndHorizontal();
        }