| Shawn O. Pearce | e31d02c | 2009-12-08 12:21:37 -0800 | [diff] [blame] | 1 | Gerrit Code Review - Eclipse Setup |
| 2 | ================================== |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 3 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 4 | This document is about configuring Gerrit Code Review into an |
| Shawn O. Pearce | 5eaf5d9 | 2009-12-21 15:16:10 -0800 | [diff] [blame] | 5 | Eclipse workspace for development and debugging with GWT. |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 6 | |
| Shawn O. Pearce | 5eaf5d9 | 2009-12-21 15:16:10 -0800 | [diff] [blame] | 7 | Java 6 or later SDK is also required to run GWT's compiler and |
| 8 | runtime debugging environment. |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 9 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 10 | |
| Martin Fick | 081fa51 | 2011-08-12 11:22:45 -0600 | [diff] [blame] | 11 | [[Formatting]] |
| Shawn O. Pearce | e89544b | 2009-04-28 07:59:44 -0700 | [diff] [blame] | 12 | Code Formatter Settings |
| 13 | ----------------------- |
| 14 | |
| Shawn O. Pearce | 44671f5 | 2009-11-07 12:55:26 -0800 | [diff] [blame] | 15 | Import `tools/GoogleFormat.xml` using Window -> Preferences -> |
| 16 | Java -> Code Style -> Formatter -> Import... |
| Shawn O. Pearce | e89544b | 2009-04-28 07:59:44 -0700 | [diff] [blame] | 17 | |
| 18 | This will define the 'Google Format' profile, which the project |
| 19 | settings prefer when formatting source code. |
| 20 | |
| 21 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 22 | Site Initialization |
| 23 | ------------------- |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 24 | |
| David Ostrovsky | dcee572 | 2013-05-15 00:10:55 +0200 | [diff] [blame] | 25 | Build once on the command line with |
| 26 | link:dev-buck.html#build[Buck] and then follow |
| David Pursehouse | 6de7ee2 | 2013-05-20 11:08:51 +0900 | [diff] [blame] | 27 | link:dev-readme.html#init[Site Initialization] in the |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 28 | Developer Setup guide to configure a local site for testing. |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 29 | |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 30 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 31 | Testing |
| 32 | ------- |
| Shawn O. Pearce | 8d2f184 | 2009-05-13 07:59:04 -0700 | [diff] [blame] | 33 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 34 | Running the Daemon |
| 35 | ~~~~~~~~~~~~~~~~~~ |
| Shawn O. Pearce | 8d2f184 | 2009-05-13 07:59:04 -0700 | [diff] [blame] | 36 | |
| David Pursehouse | 584af67 | 2013-05-20 11:15:18 +0900 | [diff] [blame] | 37 | Duplicate the existing launch configuration: |
| Shawn O. Pearce | 8d2f184 | 2009-05-13 07:59:04 -0700 | [diff] [blame] | 38 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 39 | * Run -> Debug Configurations ... |
| Shawn Pearce | cda2121 | 2013-11-28 20:49:42 -0800 | [diff] [blame^] | 40 | * Java Application -> `gerrit_daemon` |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 41 | * Right click, Duplicate |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 42 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 43 | * Modify the name to be unique. |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 44 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 45 | * Switch to Arguments tab. |
| Shawn O. Pearce | 955d00e | 2009-12-19 13:38:19 -0800 | [diff] [blame] | 46 | * 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. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 49 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 50 | * Switch to Common tab. |
| 51 | * Change Save as to be Local file. |
| David Pursehouse | 3800abd | 2013-05-08 09:24:29 +0100 | [diff] [blame] | 52 | * Close the Debug Configurations dialog and save the changes when prompted. |
| Shawn O. Pearce | 06b48c3 | 2009-05-10 16:21:05 -0700 | [diff] [blame] | 53 | |
| Shawn O. Pearce | 06b48c3 | 2009-05-10 16:21:05 -0700 | [diff] [blame] | 54 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 55 | Running Hosted Mode |
| 56 | ~~~~~~~~~~~~~~~~~~~ |
| Shawn O. Pearce | 06b48c3 | 2009-05-10 16:21:05 -0700 | [diff] [blame] | 57 | |
| David Pursehouse | 584af67 | 2013-05-20 11:15:18 +0900 | [diff] [blame] | 58 | Duplicate the existing launch configuration: |
| Shawn O. Pearce | 955d00e | 2009-12-19 13:38:19 -0800 | [diff] [blame] | 59 | |
| 60 | * Run -> Debug Configurations ... |
| David Ostrovsky | dcee572 | 2013-05-15 00:10:55 +0200 | [diff] [blame] | 61 | * Java Application -> `buck_gwt_debug` |
| Shawn O. Pearce | 955d00e | 2009-12-19 13:38:19 -0800 | [diff] [blame] | 62 | * 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 Pursehouse | 3800abd | 2013-05-08 09:24:29 +0100 | [diff] [blame] | 73 | * Close the Debug Configurations dialog and save the changes when prompted. |
| Shawn O. Pearce | 06b48c3 | 2009-05-10 16:21:05 -0700 | [diff] [blame] | 74 | |
| Shawn O. Pearce | 5500e69 | 2009-05-28 15:55:01 -0700 | [diff] [blame] | 75 | |
| Edwin Kempin | 745684d | 2012-07-19 20:06:53 +0200 | [diff] [blame] | 76 | [[known-problems]] |
| Magnus Bäck | f3766b9 | 2012-05-08 21:28:09 -0400 | [diff] [blame] | 77 | Known problems |
| 78 | -------------- |
| 79 | |
| Magnus Bäck | e246351 | 2012-06-06 11:13:54 -0400 | [diff] [blame] | 80 | * OpenID authentication won't work in hosted mode, so you need to change |
| 81 | the link:config-gerrit.html#auth.type[auth.type] configuration parameter |
| 82 | to `DEVELOPMENT_BECOME_ANY_ACCOUNT` to disable OpenID and allow you to |
| 83 | impersonate whatever account you otherwise would've used. |
| 84 | |
| David Pursehouse | 3800abd | 2013-05-08 09:24:29 +0100 | [diff] [blame] | 85 | * Error "Cannot create ReviewDb" occurs if the test site is already running. |
| 86 | Stop the test site with `gerrit.sh stop` before attempting to run hosted mode |
| 87 | debugging. |
| 88 | |
| David Ostrovsky | 90afc35 | 2013-03-17 14:31:17 +0100 | [diff] [blame] | 89 | * Gerrit site doesn't appear, only directory listing is shown. Web toolkit |
| 90 | developer browser plugin is missing. If there is no warning, that browser |
| 91 | plugin is missing with the suggestion to install it, you can install the |
| 92 | right extension for your browser from the following locations: |
| 93 | + |
| 94 | https://dl.google.com/dl/gwt/plugins/chrome/gwt-dev-plugin.crx[Chrome] |
| 95 | + |
| 96 | link:https://dl.google.com/dl/gwt/plugins/firefox/gwt-dev-plugin.xpi[Firefox] |
| 97 | + |
| 98 | link:http://dl.google.com/dl/gwt/plugins/ie/1.0.7263.20091208111100/gwt-dev-plugin.msi[IE] |
| 99 | + |
| 100 | https://dl.google.com/dl/gwt/plugins/safari/gwt-dev-plugin.dmg[Safari] |
| Magnus Bäck | f3766b9 | 2012-05-08 21:28:09 -0400 | [diff] [blame] | 101 | |
| Shawn O. Pearce | 5500e69 | 2009-05-28 15:55:01 -0700 | [diff] [blame] | 102 | GERRIT |
| 103 | ------ |
| 104 | Part of link:index.html[Gerrit Code Review] |
| Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 105 | |
| 106 | SEARCHBOX |
| 107 | --------- |