Exemplo n.º 1
0
  def setup_parser(cls, option_group, args, mkflag):
    IdeGen.setup_parser(option_group, args, mkflag)

    supported_versions = sorted(list(_VERSIONS.keys()))
    option_group.add_option(mkflag("idea-version"), dest = "idea_gen_version",
                            default = '11', type = "choice", choices = supported_versions,
                            help = "[%%default] The IntelliJ IDEA version the project "
                                   "configuration should be generated for; can be one of: " \
                                   "%s" % supported_versions)

    option_group.add_option(mkflag("merge"), mkflag("merge", negate=True), default = True,
                            action="callback", callback=mkflag.set_bool, dest = "idea_gen_merge",
                            help = "[%default] Merge any manual customizations in existing "
                                   "Intellij IDEA configuration. If False, manual customizations "
                                   "will be over-written.")

    option_group.add_option(mkflag("open"), mkflag("open", negate=True), default = True,
                            action="callback", callback=mkflag.set_bool, dest = "idea_gen_open",
                            help = "[%default] Attempts top open the generated project in IDEA.")

    option_group.add_option(mkflag("bash"), mkflag("bash", negate=True), default = False,
                            action="callback", callback=mkflag.set_bool, dest = "idea_gen_bash",
                            help = "Adds a bash facet to the generated project configuration.")
    option_group.add_option(mkflag("fsc"), mkflag("fsc", negate=True), default = False,
                            action="callback", callback=mkflag.set_bool, dest = "idea_gen_fsc",
                            help = "If the project contains any scala targets this specifies the "
                                   "fsc compiler should be enabled.")
    option_group.add_option(mkflag("java-encoding"), default = "UTF-8",
                            dest = "idea_gen_java_encoding",
                            help = "[%default] Sets the file encoding for java files in this "
                                   "project.")
Exemplo n.º 2
0
    def __init__(self, context):
        IdeGen.__init__(self, context)

        self.intellij_output_dir = os.path.join(self.work_dir, 'out')
        self.nomerge = not context.options.idea_gen_merge
        self.open = context.options.idea_gen_open
        self.bash = context.options.idea_gen_bash

        self.scala_language_level = _SCALA_VERSIONS.get(
            context.options.idea_scala_language_level, None)
        self.scala_maximum_heap_size = (
            context.options.idea_gen_scala_maximum_heap_size
            or context.config.getint(
                'idea', 'scala_maximum_heap_size_mb', default=512))
        self.fsc = context.options.idea_gen_fsc

        self.java_encoding = context.options.idea_gen_java_encoding
        self.java_maximum_heap_size = (
            context.options.idea_gen_java_maximum_heap_size
            or context.config.getint(
                'idea', 'java_maximum_heap_size_mb', default=128))

        idea_version = _VERSIONS[context.options.idea_gen_version]
        self.project_template = os.path.join(
            _TEMPLATE_BASEDIR, 'project-%s.mustache' % idea_version)
        self.module_template = os.path.join(
            _TEMPLATE_BASEDIR, 'module-%s.mustache' % idea_version)

        self.project_filename = os.path.join(self.cwd,
                                             '%s.ipr' % self.project_name)
        self.module_filename = os.path.join(self.work_dir,
                                            '%s.iml' % self.project_name)
Exemplo n.º 3
0
  def __init__(self, context):
    IdeGen.__init__(self, context)


    self.intellij_output_dir = os.path.join(self.work_dir, 'out')
    self.nomerge = not context.options.idea_gen_merge
    self.open = context.options.idea_gen_open
    self.bash = context.options.idea_gen_bash

    self.scala_language_level = _SCALA_VERSIONS.get(context.options.idea_scala_language_level, None)
    self.scala_maximum_heap_size = (
      context.options.idea_gen_scala_maximum_heap_size
      or context.config.getint('idea', 'scala_maximum_heap_size_mb', default=512)
    )
    self.fsc = context.options.idea_gen_fsc

    self.java_encoding = context.options.idea_gen_java_encoding
    self.java_maximum_heap_size = (
      context.options.idea_gen_java_maximum_heap_size
      or context.config.getint('idea', 'java_maximum_heap_size_mb', default=128)
    )

    idea_version = _VERSIONS[context.options.idea_gen_version]
    self.project_template = os.path.join(_TEMPLATE_BASEDIR, 'project-%s.mustache' % idea_version)
    self.module_template = os.path.join(_TEMPLATE_BASEDIR, 'module-%s.mustache' % idea_version)

    self.project_filename = os.path.join(self.cwd, '%s.ipr' % self.project_name)
    self.module_filename = os.path.join(self.work_dir, '%s.iml' % self.project_name)
Exemplo n.º 4
0
  def setup_parser(cls, option_group, args, mkflag):
    IdeGen.setup_parser(option_group, args, mkflag)

    supported_versions = sorted(list(_VERSIONS.keys()))
    option_group.add_option(mkflag("eclipse-version"), dest = "eclipse_gen_version",
                            default = '3.6', type = "choice", choices = supported_versions,
                            help = "[%%default] The Eclipse version the project "
                                   "configuration should be generated for; can be one of: "
                                   "%s" % supported_versions)
Exemplo n.º 5
0
    def setup_parser(cls, option_group, args, mkflag):
        IdeGen.setup_parser(option_group, args, mkflag)

        supported_versions = sorted(list(_VERSIONS.keys()))
        option_group.add_option(
            mkflag("eclipse-version"),
            dest="eclipse_gen_version",
            default='3.6',
            type="choice",
            choices=supported_versions,
            help="[%%default] The Eclipse version the project "
            "configuration should be generated for; can be one of: "
            "%s" % supported_versions)
Exemplo n.º 6
0
  def __init__(self, context):
    IdeGen.__init__(self, context)

    eclipse_version = _VERSIONS[context.options.eclipse_gen_version]
    self.project_template = os.path.join(_TEMPLATE_BASEDIR, 'project-%s.mk' % eclipse_version)
    self.classpath_template = os.path.join(_TEMPLATE_BASEDIR, 'classpath-%s.mk' % eclipse_version)
    self.apt_template = os.path.join(_TEMPLATE_BASEDIR, 'factorypath-%s.mk' % eclipse_version)
    self.pydev_template = os.path.join(_TEMPLATE_BASEDIR, 'pydevproject-%s.mk' % eclipse_version)
    self.debug_template = os.path.join(_TEMPLATE_BASEDIR, 'debug-launcher-%s.mk' % eclipse_version)

    self.project_filename = os.path.join(self.cwd, '.project')
    self.classpath_filename = os.path.join(self.cwd, '.classpath')
    self.apt_filename = os.path.join(self.cwd, '.factorypath')
    self.pydev_filename = os.path.join(self.cwd, '.pydevproject')
Exemplo n.º 7
0
    def __init__(self, context):
        IdeGen.__init__(self, context)

        version = _VERSIONS[context.options.eclipse_gen_version]
        self.project_template = os.path.join(_TEMPLATE_BASEDIR, "project-%s.mustache" % version)
        self.classpath_template = os.path.join(_TEMPLATE_BASEDIR, "classpath-%s.mustache" % version)
        self.apt_template = os.path.join(_TEMPLATE_BASEDIR, "factorypath-%s.mustache" % version)
        self.pydev_template = os.path.join(_TEMPLATE_BASEDIR, "pydevproject-%s.mustache" % version)
        self.debug_template = os.path.join(_TEMPLATE_BASEDIR, "debug-launcher-%s.mustache" % version)
        self.coreprefs_template = os.path.join(_TEMPLATE_BASEDIR, "org.eclipse.jdt.core.prefs-%s.mustache" % version)

        self.project_filename = os.path.join(self.cwd, ".project")
        self.classpath_filename = os.path.join(self.cwd, ".classpath")
        self.apt_filename = os.path.join(self.cwd, ".factorypath")
        self.pydev_filename = os.path.join(self.cwd, ".pydevproject")
        self.coreprefs_filename = os.path.join(self.cwd, ".settings", "org.eclipse.jdt.core.prefs")
Exemplo n.º 8
0
  def __init__(self, context):
    IdeGen.__init__(self, context)


    self.intellij_output_dir = os.path.join(self.work_dir, 'out')
    self.nomerge = not context.options.idea_gen_merge
    self.open = context.options.idea_gen_open
    self.bash = context.options.idea_gen_bash
    self.fsc = context.options.idea_gen_fsc
    self.java_encoding = context.options.idea_gen_java_encoding

    idea_version = _VERSIONS[context.options.idea_gen_version]
    self.project_template = os.path.join(_TEMPLATE_BASEDIR, 'project-%s.mk' % idea_version)
    self.module_template = os.path.join(_TEMPLATE_BASEDIR, 'module-%s.mk' % idea_version)

    self.project_filename = os.path.join(self.cwd, '%s.ipr' % self.project_name)
    self.module_filename = os.path.join(self.work_dir, '%s.iml' % self.project_name)
Exemplo n.º 9
0
  def __init__(self, context):
    IdeGen.__init__(self, context)

    version = _VERSIONS[context.options.eclipse_gen_version]
    self.project_template = os.path.join(_TEMPLATE_BASEDIR, 'project-%s.mustache' % version)
    self.classpath_template = os.path.join(_TEMPLATE_BASEDIR, 'classpath-%s.mustache' % version)
    self.apt_template = os.path.join(_TEMPLATE_BASEDIR, 'factorypath-%s.mustache' % version)
    self.pydev_template = os.path.join(_TEMPLATE_BASEDIR, 'pydevproject-%s.mustache' % version)
    self.debug_template = os.path.join(_TEMPLATE_BASEDIR, 'debug-launcher-%s.mustache' % version)
    self.coreprefs_template = os.path.join(_TEMPLATE_BASEDIR,
                                           'org.eclipse.jdt.core.prefs-%s.mustache' % version)

    self.project_filename = os.path.join(self.cwd, '.project')
    self.classpath_filename = os.path.join(self.cwd, '.classpath')
    self.apt_filename = os.path.join(self.cwd, '.factorypath')
    self.pydev_filename = os.path.join(self.cwd, '.pydevproject')
    self.coreprefs_filename = os.path.join(self.cwd, '.settings', 'org.eclipse.jdt.core.prefs')
Exemplo n.º 10
0
    def __init__(self, context):
        IdeGen.__init__(self, context)

        eclipse_version = _VERSIONS[context.options.eclipse_gen_version]
        self.project_template = os.path.join(
            _TEMPLATE_BASEDIR, 'project-%s.mustache' % eclipse_version)
        self.classpath_template = os.path.join(
            _TEMPLATE_BASEDIR, 'classpath-%s.mustache' % eclipse_version)
        self.apt_template = os.path.join(
            _TEMPLATE_BASEDIR, 'factorypath-%s.mustache' % eclipse_version)
        self.pydev_template = os.path.join(
            _TEMPLATE_BASEDIR, 'pydevproject-%s.mustache' % eclipse_version)
        self.debug_template = os.path.join(
            _TEMPLATE_BASEDIR, 'debug-launcher-%s.mustache' % eclipse_version)

        self.project_filename = os.path.join(self.cwd, '.project')
        self.classpath_filename = os.path.join(self.cwd, '.classpath')
        self.apt_filename = os.path.join(self.cwd, '.factorypath')
        self.pydev_filename = os.path.join(self.cwd, '.pydevproject')
Exemplo n.º 11
0
    def setup_parser(cls, option_group, args, mkflag):
        IdeGen.setup_parser(option_group, args, mkflag)

        supported_versions = sorted(list(_VERSIONS.keys()))
        option_group.add_option(
            mkflag("idea-version"),
            dest="idea_gen_version",
            default="11",
            type="choice",
            choices=supported_versions,
            help="[%%default] The IntelliJ IDEA version the project "
            "configuration should be generated for; can be one of: "
            "%s" % supported_versions,
        )

        option_group.add_option(
            mkflag("merge"),
            mkflag("merge", negate=True),
            default=True,
            action="callback",
            callback=mkflag.set_bool,
            dest="idea_gen_merge",
            help="[%default] Merge any manual customizations in existing "
            "Intellij IDEA configuration. If False, manual customizations "
            "will be over-written.",
        )

        option_group.add_option(
            mkflag("open"),
            mkflag("open", negate=True),
            default=True,
            action="callback",
            callback=mkflag.set_bool,
            dest="idea_gen_open",
            help="[%default] Attempts top open the generated project in IDEA.",
        )

        option_group.add_option(
            mkflag("bash"),
            mkflag("bash", negate=True),
            default=False,
            action="callback",
            callback=mkflag.set_bool,
            dest="idea_gen_bash",
            help="Adds a bash facet to the generated project configuration.",
        )

        option_group.add_option(
            mkflag("scala-language-level"),
            default=_SCALA_VERSION_DEFAULT,
            type="choice",
            choices=_SCALA_VERSIONS.keys(),
            dest="idea_scala_language_level",
            help="[%default] Set the scala language level used for IDEA linting.",
        )
        option_group.add_option(
            mkflag("scala-maximum-heap-size"),
            dest="idea_gen_scala_maximum_heap_size",
            help="[%default] Sets the maximum heap size (in megabytes) for scalac.",
        )
        option_group.add_option(
            mkflag("fsc"),
            mkflag("fsc", negate=True),
            default=False,
            action="callback",
            callback=mkflag.set_bool,
            dest="idea_gen_fsc",
            help="If the project contains any scala targets this specifies the " "fsc compiler should be enabled.",
        )

        option_group.add_option(
            mkflag("java-encoding"),
            default="UTF-8",
            dest="idea_gen_java_encoding",
            help="[%default] Sets the file encoding for java files in this " "project.",
        )
        option_group.add_option(
            mkflag("java-maximum-heap-size"),
            dest="idea_gen_java_maximum_heap_size",
            help="[%default] Sets the maximum heap size (in megabytes) for javac.",
        )