blob: 384bb74f410af1390a8fb0491db56607202a8bdf [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - Eclipse Setup
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08002
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -08003This document is about configuring Gerrit Code Review into an
Shawn O. Pearce5eaf5d92009-12-21 15:16:10 -08004Eclipse workspace for development and debugging with GWT.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08005
Shawn O. Pearce5eaf5d92009-12-21 15:16:10 -08006Java 6 or later SDK is also required to run GWT's compiler and
7runtime debugging environment.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -08008
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -08009
Martin Fick081fa512011-08-12 11:22:45 -060010[[Formatting]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080011== Code Formatter Settings
Shawn O. Pearcee89544b2009-04-28 07:59:44 -070012
Shawn O. Pearce44671f52009-11-07 12:55:26 -080013Import `tools/GoogleFormat.xml` using Window -> Preferences ->
14Java -> Code Style -> Formatter -> Import...
Shawn O. Pearcee89544b2009-04-28 07:59:44 -070015
16This will define the 'Google Format' profile, which the project
17settings prefer when formatting source code.
18
19
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080020== Site Initialization
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080021
David Ostrovskydcee5722013-05-15 00:10:55 +020022Build once on the command line with
23link:dev-buck.html#build[Buck] and then follow
David Pursehouse6de7ee22013-05-20 11:08:51 +090024link:dev-readme.html#init[Site Initialization] in the
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080025Developer Setup guide to configure a local site for testing.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080026
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080027
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080028== Testing
Shawn O. Pearce8d2f1842009-05-13 07:59:04 -070029
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080030=== Running the Daemon
Shawn O. Pearce8d2f1842009-05-13 07:59:04 -070031
David Pursehouse584af672013-05-20 11:15:18 +090032Duplicate the existing launch configuration:
Shawn O. Pearce8d2f1842009-05-13 07:59:04 -070033
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080034* Run -> Debug Configurations ...
Shawn Pearcecda21212013-11-28 20:49:42 -080035* Java Application -> `gerrit_daemon`
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080036* Right click, Duplicate
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080037
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080038* Modify the name to be unique.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080039
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080040* Switch to Arguments tab.
Shawn O. Pearce955d00e2009-12-19 13:38:19 -080041* Edit the `-d` program argument flag to match the path used during
David Pursehouse9db23782013-12-17 11:59:22 +090042 'init'. The template launch configuration resolves to ../gerrit_testsite
Shawn O. Pearce955d00e2009-12-19 13:38:19 -080043 since that is what the documentation recommends.
Shawn O. Pearced2b73db2009-01-09 11:55:47 -080044
Shawn O. Pearce18f1f7f2009-12-16 11:32:39 -080045* Switch to Common tab.
46* Change Save as to be Local file.
David Pursehouse3800abd2013-05-08 09:24:29 +010047* Close the Debug Configurations dialog and save the changes when prompted.
Shawn O. Pearce06b48c32009-05-10 16:21:05 -070048
Shawn O. Pearce06b48c32009-05-10 16:21:05 -070049
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080050=== Running Hosted Mode
Shawn O. Pearce06b48c32009-05-10 16:21:05 -070051
David Pursehouse584af672013-05-20 11:15:18 +090052Duplicate the existing launch configuration:
Shawn O. Pearce955d00e2009-12-19 13:38:19 -080053
54* Run -> Debug Configurations ...
David Ostrovskydcee5722013-05-15 00:10:55 +020055* Java Application -> `buck_gwt_debug`
Shawn O. Pearce955d00e2009-12-19 13:38:19 -080056* Right click, Duplicate
57
58* Modify the name to be unique.
59
60* Switch to Arguments tab.
61* Edit the `-Dgerrit.site_path=` VM argument to match the path
62 used during 'init'. The template launch configuration resolves
David Pursehouse9db23782013-12-17 11:59:22 +090063 to ../gerrit_testsite since that is what the documentation recommends.
Shawn O. Pearce955d00e2009-12-19 13:38:19 -080064
65* Switch to Common tab.
66* Change Save as to be Local file.
David Pursehouse3800abd2013-05-08 09:24:29 +010067* Close the Debug Configurations dialog and save the changes when prompted.
Shawn O. Pearce06b48c32009-05-10 16:21:05 -070068
Shawn O. Pearce5500e692009-05-28 15:55:01 -070069
Edwin Kempin745684d2012-07-19 20:06:53 +020070[[known-problems]]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080071== Known problems
Magnus Bäckf3766b92012-05-08 21:28:09 -040072
Magnus Bäcke2463512012-06-06 11:13:54 -040073* OpenID authentication won't work in hosted mode, so you need to change
74the link:config-gerrit.html#auth.type[auth.type] configuration parameter
75to `DEVELOPMENT_BECOME_ANY_ACCOUNT` to disable OpenID and allow you to
76impersonate whatever account you otherwise would've used.
77
David Pursehouse3800abd2013-05-08 09:24:29 +010078* Error "Cannot create ReviewDb" occurs if the test site is already running.
79Stop the test site with `gerrit.sh stop` before attempting to run hosted mode
80debugging.
81
David Ostrovsky90afc352013-03-17 14:31:17 +010082* Gerrit site doesn't appear, only directory listing is shown. Web toolkit
83developer browser plugin is missing. If there is no warning, that browser
84plugin is missing with the suggestion to install it, you can install the
85right extension for your browser from the following locations:
86+
87https://dl.google.com/dl/gwt/plugins/chrome/gwt-dev-plugin.crx[Chrome]
88+
89link:https://dl.google.com/dl/gwt/plugins/firefox/gwt-dev-plugin.xpi[Firefox]
90+
91link:http://dl.google.com/dl/gwt/plugins/ie/1.0.7263.20091208111100/gwt-dev-plugin.msi[IE]
92+
93https://dl.google.com/dl/gwt/plugins/safari/gwt-dev-plugin.dmg[Safari]
Magnus Bäckf3766b92012-05-08 21:28:09 -040094
Shawn O. Pearce5500e692009-05-28 15:55:01 -070095GERRIT
96------
97Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070098
99SEARCHBOX
100---------