GettingStarted: Eclipse: Mylyn
Please see the GettingStarted: Eclipse page if you are looking for how to set up OpenDaylight with the Eclipse IDE.
This page describes how to configure the Eclipse UI plugin called Mylyn, which includes support for Gerrit, allowing you to e.g. define filters to see pending incoming Gerrit changes etc. and integrate this with the "Task focused" Mylyn-based way of working. Mylyn Gerrit also contributes some convenience functions to EGit.
Also note the GettingStarted:_Eclipse:_EGit page which explains how to configure Eclipse to be able to pull push code from & to Git / Gerrit.
EGerrit from https://www.eclipse.org/egerrit/ may be of interst to you as well, particularly because the incompatibility listed below. (If you get an "org.apache.http.client.HttpResponseException: Forbidden" when accessing https://git.opendaylight.org with EGerrit, note https://bugs.eclipse.org/bugs/show_bug.cgi?id=492014 & https://bugs.opendaylight.org/show_bug.cgi?id=5806.)
NOTE: As of 2016.4.14 the released version of Mylyn's Gerrit plugin is only compatible with Gerrit 2.9.0/4 - 2.11.3 but https://git.opendaylight.org/gerrit/ is already 2.12.2 - it's therefore not surprising that it it fails with "Problem updating repository: Gerrit connection issue: Failed to obtain Gerrit configuration" for "Query type: All Open Changes" on even an anonymous connection. Watch https://bugs.eclipse.org/bugs/show_bug.cgi?id=485981 for Gerrit 2.12 support in Mylyn. (TODO Re-test, as #485981 mentions 2.12.1 vs. opendaylight's 2.12.2 - but probably OK.)
- Select 'Help'->'Install New Software' from the menu at the top
- Enter the URL http://download.eclipse.org/mylyn/releases/latest
- Click 'Add'
- Name the Repository 'Mylyn Release' (it doesn't really matter)
- Click OK
- Click 'Select All' and unselect the 'Subclispe' related options under 'Mylyn Integration'.
- Click 'Next'
- Ignore the warning
- Click 'Next'
Accept the terms of the license Click 'Finish'
This will install all the extra stuff you need to interact with Gerrit, Bugzilla, Jenkins, etc.
Next up you need to configure the 'Signed Off' by for the DCO. To do that
- Bring up the Preferences in Eclipse
- Select 'Team'->'Git'->'Commit Dialog'
- Click 'Insert Signed-off-by'
- Click 'OK'
You will now have a fresh clean Eclipse as shown below. Select 'Connect to your task and ALM tools':
You will be prompted to pick the type of repository. Choose 'Gerrit Code Review' and Click 'Next'
- Enter Server: 'https://git.opendaylight.org/gerrit/'
- Enter Label: 'Daylight'
- Uncheck 'Anonymous'
- Enter your Gerrit User ID and Password
- Click 'Finish'
Note that your Gerrit User ID and Password here is the one you use to login to the Gerrit Web UI, i.e. what you type into https://git.opendaylight.org/gerrit/login/ which is NOT THE SAME as the credentials from https://git.opendaylight.org/gerrit/#/settings/http-password (which is, only, for git push using a HTTP password instead of SSH key).
- Title: My Changes
- Query Type: My Changes
- Click 'Finish'