Add the brief founded with the autobrief doxygen syntax
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 19 Feb 2009 14:06:28 +0000 (14:06 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 19 Feb 2009 14:06:28 +0000 (14:06 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2359 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/bertos_utils.py

index b27c754e3945180cc65e54288242fc651dd24d87..82b4ab7d607f854962973ddc53bd5eb706477720 100644 (file)
@@ -236,19 +236,27 @@ def getDescriptionInformations(comment):
     Take the doxygen comment and strip the wizard informations, returning the tuple 
     (comment, wizard_information) 
     """
+    brief = ""
     description = ""
     information = {}
     for num, line in enumerate(comment):
         index = line.find("$WIZ$")
         if index != -1:
-            description += " " + line[:index]
+            if len(brief) == 0:
+                brief += line[:index].strip()
+            else:
+                description += " " + line[:index]
             try:
                 exec line[index + len("$WIZ$ "):] in {}, information
             except:
                 raise ParseError(num, line[index:])
         else:
-            description += " " + line
-    return description.strip(), information
+            if len(brief) == 0:
+                brief += line.strip()
+            else:
+                description += " " + line
+                description = description.strip()
+    return brief.strip(), description.strip(), information
 
 def getDefinitionBlocks(text):
     """
@@ -332,7 +340,7 @@ def loadConfigurationInfos(path):
         configurationInfos = {}
         for comment, define in getDefinitionBlocks(open(path, "r").read()):
             name, value = formatParamNameValue(define)
-            description, informations = getDescriptionInformations(comment)
+            brief, description, informations = getDescriptionInformations(comment)
             configurationInfos[name] = {}
             configurationInfos[name]["value"] = value
             configurationInfos[name]["informations"] = informations
@@ -347,6 +355,7 @@ def loadConfigurationInfos(path):
                 configurationInfos[name]["informations"]["unsigned"] = True
                 configurationInfos[name]["value"] = configurationInfos[name]["value"].replace("U", "")
             configurationInfos[name]["description"] = description
+            configurationInfos[name]["brief"] = brief
         return configurationInfos
     except ParseError, err:
         print "error in file %s. line: %d - statement %s" % (path, err.line_number, err.line)