Improove the ui
[bertos.git] / wizard / plugins / codelite.py
index 6e14f51e61404a53b8f102883ec4b6e46927fb12..d286f57e242b703257a599841522b9addc382597 100644 (file)
@@ -13,6 +13,26 @@ import os
 
 import const
 
+## Plugin interface ##
+
+PLUGIN_NAME = "CodeLite"
+
+PLUGIN_DESCRIPTION = "Create CodeLite project files"
+
+def createProject(project_info):
+    """
+    Function that creates codelite projects and return the project relevant file.
+    """
+    directory = project_info.info("PROJECT_PATH")
+    prjdir = directory + "/" + os.path.basename(directory)
+    workspace = codeliteWorkspaceGenerator(project_info)
+    open(directory + "/" + os.path.basename(prjdir) + ".workspace", "w").write(workspace)
+    project = codeliteProjectGenerator(project_info)
+    open(directory + "/" + os.path.basename(prjdir) + ".project", "w").write(project)
+    return directory + "/" + os.path.basename(prjdir) + ".workspace"
+
+####
+
 def clFiles(file_dict, directory):
     """
     Creates the list of the lines for the files founded in file_dict, using
@@ -68,15 +88,3 @@ def codeliteWorkspaceGenerator(project_info):
     while template.find("$project") != -1:
         template = template.replace("$project", project_name)
     return template
-
-def createProject(project_info):
-    """
-    Function that creates codelite projects and return the project relevant file.
-    """
-    directory = project_info.info("PROJECT_PATH")
-    prjdir = directory + "/" + os.path.basename(directory)
-    workspace = codeliteWorkspaceGenerator(project_info)
-    open(directory + "/" + os.path.basename(prjdir) + ".workspace", "w").write(workspace)
-    project = codeliteProjectGenerator(project_info)
-    open(directory + "/" + os.path.basename(prjdir) + ".project", "w").write(project)
-    return directory + "/" + os.path.basename(prjdir) + ".workspace"