| 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 | |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 11 | Maven Plugin |
| 12 | ------------ |
| 13 | |
| 14 | Install the Maven Integration plugins: |
| 15 | |
| 16 | http://m2eclipse.codehaus.org/[m2eclipse] |
| 17 | |
| 18 | |
| Shawn O. Pearce | e89544b | 2009-04-28 07:59:44 -0700 | [diff] [blame] | 19 | Code Formatter Settings |
| 20 | ----------------------- |
| 21 | |
| Shawn O. Pearce | 44671f5 | 2009-11-07 12:55:26 -0800 | [diff] [blame] | 22 | Import `tools/GoogleFormat.xml` using Window -> Preferences -> |
| 23 | Java -> Code Style -> Formatter -> Import... |
| Shawn O. Pearce | e89544b | 2009-04-28 07:59:44 -0700 | [diff] [blame] | 24 | |
| 25 | This will define the 'Google Format' profile, which the project |
| 26 | settings prefer when formatting source code. |
| 27 | |
| 28 | |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 29 | Import Projects |
| 30 | --------------- |
| 31 | |
| Shawn O. Pearce | 263786e | 2009-02-02 15:49:26 -0800 | [diff] [blame] | 32 | Import pom.xml using General -> Maven Projects |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 33 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 34 | Some of the source code is generated with ANTLR sources. To build |
| 35 | these files, right click on the imported projects, Maven -> Update |
| 36 | Project Configuration. This will resolve compile errors identified |
| 37 | after import. |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 38 | |
| 39 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 40 | Site Initialization |
| 41 | ------------------- |
| 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 | link:dev-readme.html#build[Build] once on the command line and |
| 44 | then follow link:dev-readme.html#init[Site Initialization] in the |
| 45 | Developer Setup guide to configure a local site for testing. |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 46 | |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 47 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 48 | Testing |
| 49 | ------- |
| Shawn O. Pearce | 8d2f184 | 2009-05-13 07:59:04 -0700 | [diff] [blame] | 50 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 51 | Running the Daemon |
| 52 | ~~~~~~~~~~~~~~~~~~ |
| Shawn O. Pearce | 8d2f184 | 2009-05-13 07:59:04 -0700 | [diff] [blame] | 53 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 54 | Duplicate the existing `pgm_daemon` launch configuration: |
| Shawn O. Pearce | 8d2f184 | 2009-05-13 07:59:04 -0700 | [diff] [blame] | 55 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 56 | * Run -> Debug Configurations ... |
| 57 | * Java Application -> `pgm_daemon` |
| 58 | * Right click, Duplicate |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 59 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 60 | * Modify the name to be unique. |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 61 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 62 | * Switch to Arguments tab. |
| Shawn O. Pearce | 955d00e | 2009-12-19 13:38:19 -0800 | [diff] [blame] | 63 | * Edit the `-d` program argument flag to match the path used during |
| 64 | 'init'. The template launch configuration resolves to ../test_site |
| 65 | since that is what the documentation recommends. |
| Shawn O. Pearce | d2b73db | 2009-01-09 11:55:47 -0800 | [diff] [blame] | 66 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 67 | * Switch to Common tab. |
| 68 | * Change Save as to be Local file. |
| Shawn O. Pearce | 06b48c3 | 2009-05-10 16:21:05 -0700 | [diff] [blame] | 69 | |
| Shawn O. Pearce | 06b48c3 | 2009-05-10 16:21:05 -0700 | [diff] [blame] | 70 | |
| Shawn O. Pearce | 18f1f7f | 2009-12-16 11:32:39 -0800 | [diff] [blame] | 71 | Running Hosted Mode |
| 72 | ~~~~~~~~~~~~~~~~~~~ |
| Shawn O. Pearce | 06b48c3 | 2009-05-10 16:21:05 -0700 | [diff] [blame] | 73 | |
| Shawn O. Pearce | 5eaf5d9 | 2009-12-21 15:16:10 -0800 | [diff] [blame^] | 74 | Duplicate the existing `gwtui_dbg` launch configuration: |
| Shawn O. Pearce | 955d00e | 2009-12-19 13:38:19 -0800 | [diff] [blame] | 75 | |
| 76 | * Run -> Debug Configurations ... |
| Shawn O. Pearce | 5eaf5d9 | 2009-12-21 15:16:10 -0800 | [diff] [blame^] | 77 | * Java Application -> `gwtui_dbg` |
| Shawn O. Pearce | 955d00e | 2009-12-19 13:38:19 -0800 | [diff] [blame] | 78 | * Right click, Duplicate |
| 79 | |
| 80 | * Modify the name to be unique. |
| 81 | |
| 82 | * Switch to Arguments tab. |
| 83 | * Edit the `-Dgerrit.site_path=` VM argument to match the path |
| 84 | used during 'init'. The template launch configuration resolves |
| 85 | to ../test_site since that is what the documentation recommends. |
| 86 | |
| 87 | * Switch to Common tab. |
| 88 | * Change Save as to be Local file. |
| Shawn O. Pearce | 06b48c3 | 2009-05-10 16:21:05 -0700 | [diff] [blame] | 89 | |
| Shawn O. Pearce | 5500e69 | 2009-05-28 15:55:01 -0700 | [diff] [blame] | 90 | |
| 91 | GERRIT |
| 92 | ------ |
| 93 | Part of link:index.html[Gerrit Code Review] |