blob: dab246be8d3e5d55661e858f0f742d69e0de622b [file] [log] [blame]
Gerrit Code Review - Eclipse Setup
==================================
This document is about configuring Gerrit Code Review into an
Eclipse workspace for development and debugging with the GWT
hosted mode debugger.
You will need to have the GWT (Google Web Toolkit) 1.7 SDK installed
on your system. A Java 6 or later SDK is also required to run
GWT's compiler and runtime.
GWT requires the Sun JDK (or OpenJDK). The GWT "hosted mode"
environment (Eclipse debugger or "make web-shell") does not work
under libgcj.
User Library
------------
Create a user library called `GWT_17`:
* Window > Preferences
* Java > Build Path > User Libraries
* New
* Name: `GWT_17`
* Add JARs...
* Select `gwt-user.jar` from the $(GWT_SDK) directory.
* Select `gwt-dev-$(OS).jar` from the $(GWT_SDK) directory.
Maven Plugin
------------
Install the Maven Integration plugins:
http://m2eclipse.codehaus.org/[m2eclipse]
Code Formatter Settings
-----------------------
Import `tools/GoogleFormat.xml` using Window -> Preferences ->
Java -> Code Style -> Formatter -> Import...
This will define the 'Google Format' profile, which the project
settings prefer when formatting source code.
Import Projects
---------------
Import pom.xml using General -> Maven Projects
Some of the source code is generated with ANTLR sources. To build
these files, right click on the imported projects, Maven -> Update
Project Configuration. This will resolve compile errors identified
after import.
Site Initialization
-------------------
link:dev-readme.html#build[Build] once on the command line and
then follow link:dev-readme.html#init[Site Initialization] in the
Developer Setup guide to configure a local site for testing.
Testing
-------
Running the Daemon
~~~~~~~~~~~~~~~~~~
Duplicate the existing `pgm_daemon` launch configuration:
* Run -> Debug Configurations ...
* Java Application -> `pgm_daemon`
* Right click, Duplicate
* Modify the name to be unique.
* Switch to Arguments tab.
* Edit the `-d` program argument flag to match the path used during
'init'. The template launch configuration resolves to ../test_site
since that is what the documentation recommends.
* Switch to Common tab.
* Change Save as to be Local file.
Running Hosted Mode
~~~~~~~~~~~~~~~~~~~
Duplicate the existing `gwtui_any` (or `gwtui_mac` if on Mac OS X)
launch configuration:
* Run -> Debug Configurations ...
* Java Application -> `gwtui_any`
* Right click, Duplicate
* Modify the name to be unique.
* Switch to Arguments tab.
* Edit the `-Dgerrit.site_path=` VM argument to match the path
used during 'init'. The template launch configuration resolves
to ../test_site since that is what the documentation recommends.
* Switch to Common tab.
* Change Save as to be Local file.
GERRIT
------
Part of link:index.html[Gerrit Code Review]