blob: 50236a20f0dde35fb7c3158af5e8f89e1dbdfd6c [file] [log] [blame]
Shawn O. Pearcee31d02c2009-12-08 12:21:37 -08001Gerrit Code Review - Eclipse Setup
2==================================
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08003
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -08004This document is about configuring Gerrit Code Review into an
Shawn O. Pearce5eaf5d92009-12-21 15:16:10 -08005Eclipse workspace for development and debugging with GWT.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08006
Shawn O. Pearce5eaf5d92009-12-21 15:16:10 -08007Java 6 or later SDK is also required to run GWT's compiler and
8runtime debugging environment.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08009
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080010
Martin Fick081fa512011-08-12 11:22:45 -060011[[Formatting]]
Shawn O. Pearcee89544b2009-04-28 07:59:44 -070012Code Formatter Settings
13-----------------------
14
Shawn O. Pearce44671f52009-11-07 12:55:26 -080015Import `tools/GoogleFormat.xml` using Window -> Preferences ->
16Java -> Code Style -> Formatter -> Import...
Shawn O. Pearcee89544b2009-04-28 07:59:44 -070017
18This will define the 'Google Format' profile, which the project
19settings prefer when formatting source code.
20
21
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080022Site Initialization
23-------------------
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080024
David Ostrovskydcee5722013-05-15 00:10:55 +020025Build once on the command line with
26link:dev-buck.html#build[Buck] and then follow
David Pursehouse6de7ee22013-05-20 11:08:51 +090027link:dev-readme.html#init[Site Initialization] in the
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080028Developer Setup guide to configure a local site for testing.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080029
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080030
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080031Testing
32-------
Shawn O. Pearce8d2f1842009-05-13 07:59:04 -070033
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080034Running the Daemon
35~~~~~~~~~~~~~~~~~~
Shawn O. Pearce8d2f1842009-05-13 07:59:04 -070036
David Pursehouse584af672013-05-20 11:15:18 +090037Duplicate the existing launch configuration:
Shawn O. Pearce8d2f1842009-05-13 07:59:04 -070038
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080039* Run -> Debug Configurations ...
Shawn Pearcecda21212013-11-28 20:49:42 -080040* Java Application -> `gerrit_daemon`
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080041* Right click, Duplicate
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080042
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080043* Modify the name to be unique.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080044
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080045* Switch to Arguments tab.
Shawn O. Pearce955d00e2009-12-19 13:38:19 -080046* Edit the `-d` program argument flag to match the path used during
47 'init'. The template launch configuration resolves to ../test_site
48 since that is what the documentation recommends.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080049
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080050* Switch to Common tab.
51* Change Save as to be Local file.
David Pursehouse3800abd2013-05-08 09:24:29 +010052* Close the Debug Configurations dialog and save the changes when prompted.
Shawn O. Pearce06b48c32009-05-10 16:21:05 -070053
Shawn O. Pearce06b48c32009-05-10 16:21:05 -070054
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080055Running Hosted Mode
56~~~~~~~~~~~~~~~~~~~
Shawn O. Pearce06b48c32009-05-10 16:21:05 -070057
David Pursehouse584af672013-05-20 11:15:18 +090058Duplicate the existing launch configuration:
Shawn O. Pearce955d00e2009-12-19 13:38:19 -080059
60* Run -> Debug Configurations ...
David Ostrovskydcee5722013-05-15 00:10:55 +020061* Java Application -> `buck_gwt_debug`
Shawn O. Pearce955d00e2009-12-19 13:38:19 -080062* Right click, Duplicate
63
64* Modify the name to be unique.
65
66* Switch to Arguments tab.
67* Edit the `-Dgerrit.site_path=` VM argument to match the path
68 used during 'init'. The template launch configuration resolves
69 to ../test_site since that is what the documentation recommends.
70
71* Switch to Common tab.
72* Change Save as to be Local file.
David Pursehouse3800abd2013-05-08 09:24:29 +010073* Close the Debug Configurations dialog and save the changes when prompted.
Shawn O. Pearce06b48c32009-05-10 16:21:05 -070074
Shawn O. Pearce5500e692009-05-28 15:55:01 -070075
Edwin Kempin745684d2012-07-19 20:06:53 +020076[[known-problems]]
Magnus Bäckf3766b92012-05-08 21:28:09 -040077Known problems
78--------------
79
Magnus Bäcke2463512012-06-06 11:13:54 -040080* OpenID authentication won't work in hosted mode, so you need to change
81the link:config-gerrit.html#auth.type[auth.type] configuration parameter
82to `DEVELOPMENT_BECOME_ANY_ACCOUNT` to disable OpenID and allow you to
83impersonate whatever account you otherwise would've used.
84
David Pursehouse3800abd2013-05-08 09:24:29 +010085* Error "Cannot create ReviewDb" occurs if the test site is already running.
86Stop the test site with `gerrit.sh stop` before attempting to run hosted mode
87debugging.
88
David Ostrovsky90afc352013-03-17 14:31:17 +010089* Gerrit site doesn't appear, only directory listing is shown. Web toolkit
90developer browser plugin is missing. If there is no warning, that browser
91plugin is missing with the suggestion to install it, you can install the
92right extension for your browser from the following locations:
93+
94https://dl.google.com/dl/gwt/plugins/chrome/gwt-dev-plugin.crx[Chrome]
95+
96link:https://dl.google.com/dl/gwt/plugins/firefox/gwt-dev-plugin.xpi[Firefox]
97+
98link:http://dl.google.com/dl/gwt/plugins/ie/1.0.7263.20091208111100/gwt-dev-plugin.msi[IE]
99+
100https://dl.google.com/dl/gwt/plugins/safari/gwt-dev-plugin.dmg[Safari]
Magnus Bäckf3766b92012-05-08 21:28:09 -0400101
Shawn O. Pearce5500e692009-05-28 15:55:01 -0700102GERRIT
103------
104Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -0700105
106SEARCHBOX
107---------