diff options
author | Gulsah Kose <gulsah.1004@gmail.com> | 2015-03-14 21:17:20 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-03-25 06:49:12 +0000 |
commit | e03654bbd6d672d5eacc0a915c4970c3fc4d818a (patch) | |
tree | 1e84545ab8beb8288ce02a9a7018d4d9564474b7 /bin | |
parent | ca07d5bef335b220139b858a5b54aa62983a66e1 (diff) |
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@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/14871
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/gbuild-to-ide | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index 3a78d9fb6a6a..54b46d67c4d4 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, |