eeed4976d0
gwtexpui is now built within Gerrit, so it's no longer necessary to separately clone the git to enable hosted mode debugging in Eclipse. Update the Eclipse developer documentation accordingly. Also remove references to gwtexpui from the release process documentation and the license list. Change-Id: I6bb33a2757f6a45e57f78b901bbabe2720786361
139 lines
4.1 KiB
Plaintext
139 lines
4.1 KiB
Plaintext
Gerrit Code Review - Eclipse Setup
|
|
==================================
|
|
|
|
This document is about configuring Gerrit Code Review into an
|
|
Eclipse workspace for development and debugging with GWT.
|
|
|
|
Java 6 or later SDK is also required to run GWT's compiler and
|
|
runtime debugging environment.
|
|
|
|
|
|
[[maven]]
|
|
Maven Plugin
|
|
------------
|
|
|
|
Install the Maven Integration plugins.
|
|
|
|
In Eclipse version 3.7 (Indigo) and later, these are available in the
|
|
default update site and can be found under the 'Collaboration' category.
|
|
|
|
For older versions the update site must be manually added; the link can
|
|
be found on the http://www.eclipse.org/m2e/download/[m2eclipse download page].
|
|
|
|
|
|
[[Formatting]]
|
|
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 the projects into Eclipse by going to File -> Import... -> Maven ->
|
|
Existing Maven Projects and selecting the directory containing pom.xml.
|
|
|
|
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.
|
|
|
|
|
|
[[hosted-mode]]
|
|
Running Hosted Mode
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
To debug the GWT code executing in the web browser, two additional Git
|
|
repositories need to be cloned.
|
|
|
|
* https://gerrit.googlesource.com/gwtjsonrpc
|
|
* https://gerrit.googlesource.com/gwtorm
|
|
|
|
In Eclipse, import the pom.xml file in the root directory of each of
|
|
these cloned gits via General -> Maven Projects.
|
|
|
|
Duplicate the existing `gwtui_dbg` launch configuration:
|
|
|
|
* Run -> Debug Configurations ...
|
|
* Java Application -> `gwtui_dbg`
|
|
* 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.
|
|
|
|
|
|
[[known-problems]]
|
|
Known problems
|
|
--------------
|
|
|
|
* When running Gerrit under the Eclipse debugger, code that attempts
|
|
to load Prolog code may erroneously raise ClassNotFoundException,
|
|
claiming that classes in the `Gerrit` package can't be found. The
|
|
error can often be resolved by rebuilding Gerrit with `mvn package`
|
|
and restarting the debug session.
|
|
|
|
* OpenID authentication won't work in hosted mode, so you need to change
|
|
the link:config-gerrit.html#auth.type[auth.type] configuration parameter
|
|
to `DEVELOPMENT_BECOME_ANY_ACCOUNT` to disable OpenID and allow you to
|
|
impersonate whatever account you otherwise would've used.
|
|
|
|
* Gerrit site doesn't appear, only directory listing is shown. Web toolkit
|
|
developer browser plugin is missing. If there is no warning, that browser
|
|
plugin is missing with the suggestion to install it, you can install the
|
|
right extension for your browser from the following locations:
|
|
+
|
|
https://dl.google.com/dl/gwt/plugins/chrome/gwt-dev-plugin.crx[Chrome]
|
|
+
|
|
link:https://dl.google.com/dl/gwt/plugins/firefox/gwt-dev-plugin.xpi[Firefox]
|
|
+
|
|
link:http://dl.google.com/dl/gwt/plugins/ie/1.0.7263.20091208111100/gwt-dev-plugin.msi[IE]
|
|
+
|
|
https://dl.google.com/dl/gwt/plugins/safari/gwt-dev-plugin.dmg[Safari]
|
|
|
|
GERRIT
|
|
------
|
|
Part of link:index.html[Gerrit Code Review]
|