From 6925f8a7e444dab564e0b781490d377a0475f4cb Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 17 May 2016 21:31:27 +0900 Subject: [PATCH] project.py: Allow to specify the name of the generated project Eclipse won't allow to open multiple projects with the same name. Add a --name option to the project.py to allow to specify the name of the generated project. This will allow to have multiple Gerrit workspaces in Eclipse at the same time. Change-Id: I6f6809a0a42ee21262eadd5125beb344cbaf7dfe --- tools/eclipse/project.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/eclipse/project.py b/tools/eclipse/project.py index 4b35f7c1e7..46f5680b8f 100755 --- a/tools/eclipse/project.py +++ b/tools/eclipse/project.py @@ -42,6 +42,8 @@ opts.add_option('--no-src', dest='no_src', action='store_true', help='do not attach sources') opts.add_option('--plugins', help='create eclipse projects for plugins', action='store_true') +opts.add_option('--name', help='name of the generated project', + action='store', default='gerrit', dest='project_name') args, _ = opts.parse_args() def _query_classpath(targets): @@ -223,7 +225,7 @@ try: except CalledProcessError as err: exit(1) - gen_project() + gen_project(args.project_name) gen_classpath() gen_factorypath()