[Libreoffice-commits] core.git: bin/gbuild-to-ide

Gulsah Kose gulsah.1004 at gmail.com
Tue Mar 24 23:49:37 PDT 2015


 bin/gbuild-to-ide |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

New commits:
commit e03654bbd6d672d5eacc0a915c4970c3fc4d818a
Author: Gulsah Kose <gulsah.1004 at gmail.com>
Date:   Sat Mar 14 21:17:20 2015 +0200

    fdo#84628 Created .project file generator.
    
    This patch is starting to EclipseCDT Integration. Written the .project file generating function.
    
    Change-Id: If38077561820d9a333d186a2785ecddd1113fe92
    Signed-off-by: Gulsah Kose <gulsah.1004 at gmail.com>
    Reviewed-on: https://gerrit.libreoffice.org/14871
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 3a78d9f..54b46d6 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -226,6 +226,46 @@ class IdeIntegrationGenerator:
     def emit(self):
         pass
 
+class EclipseCDTIntegrationGenerator(IdeIntegrationGenerator):
+    def __init__(self, gbuildparser, ide):
+        IdeIntegrationGenerator.__init__(self, gbuildparser, ide)
+        self.oe_cdt = 'org.eclipse.cdt'
+        self.cdt_mb = self.oe_cdt + '.managebuilder.core'
+        self.cdt_core = self.oe_cdt + '.core'
+
+    def generate_project_file(self, name, comment, xmlversion, encoding):
+
+        projectfiletemplate = """
+<?xml version="%(xmlversion)s" encoding="%(encoding)s"?>
+<projectDescription>
+        <name>%(name)s</name>
+        <comment>%(comment)s</comment>
+        <projects>
+        </projects>
+        <buildSpec>
+                <buildCommand>
+                        <name>"""+ self.cdt_mb +""".genmakebuilder</name>
+                        <triggers>clean,full,incremental,</triggers>
+                        <arguments>
+                        </arguments>
+                </buildCommand>
+                <buildCommand>
+                        <name>"""+ self.cdt_mb +""".ScannerConfigBuilder</name>
+                        <triggers>full,incremental,</triggers>
+                        <arguments>
+                        </arguments>
+                </buildCommand>
+        </buildSpec>
+        <natures>
+                <nature>""" + self.cdt_core + """.cnature</nature>
+                <nature>""" + self.cdt_core + """.ccnature</nature>
+                <nature>""" + self.cdt_mb + """.managedBuildNature</nature>
+                <nature>""" + self.cdt_mb + """.ScannerConfigNature</nature>
+        </natures>
+</projectDescription>
+"""
+
+        return projectfiletemplate % {'name': name, 'comment': comment, 'xmlversion': xmlversion, 'encoding':encoding}
 
 class DebugIntegrationGenerator(IdeIntegrationGenerator):
 
@@ -900,6 +940,7 @@ if __name__ == '__main__':
     args = parser.parse_args()
     paths = {}
     generators = {
+	'eclipsecdt': EclipseCDTIntegrationGenerator,
         'kdevelop': KdevelopIntegrationGenerator,
         'xcode': XcodeIntegrationGenerator,
         'vs2012': VisualStudioIntegrationGenerator,


More information about the Libreoffice-commits mailing list