Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EGerrit/User Guide"

(Commenting in the compare editor)
Line 1: Line 1:
{{EGerrit}}
 
 
 
= Getting Started =
 
= Getting Started =
 
== Overview ==
 
== Overview ==

Revision as of 15:52, 2 June 2016

Getting Started

Overview

The EGerrit plug-in aims at deeply integrating the best of Gerrit's features into Eclipse to minimize the context switch from the IDE to the web, and leveraging IDE specific features such as syntax coloring, navigation, etc.

Some of the key features are:

  • Search and browse reviews
  • Checkout/cherry-pick a change in your workspace
  • Submit, vote, abandon, rebase ... reviews
  • Comment directly in the source file
  • View comments as markers in the regular files
  • ...

Installing EGerrit

EGerrit is tested with the Neon and Mars releases of Eclipse.

EGerrit 1.0 is now available. You can get it from our marketplace entry or from the Neon release repository.

Of course, 1.0 is just the beginning of the journey for us. If you want to try the coming releases, feel free to get the integration builds or nightly builds.

Gerrit Dashboard

The "Gerrit dashboard" view is the entry point to everything. It allows you to define servers and search for reviews. From its toolbar, the dashboard makes available a number of pre-defined queries such as "All opened", "All merged", "My changes", etc. When these pre-defined searches are not enough, the search box in the dialog allows the user to directly enter a Gerrit query string that follow the same syntax than what is allowed in the Gerrit web ui.

Finally, know that you can paste the URL of a review (e.g. https://git.eclipse.org/r/#/c/58660/) into the search. Also if the server is undefined a new server connection will be added with anonymous access.

To see more details about the review, it suffices to double click on the entry and the review editor will be opened.

EGerritDashboard.png

Review editor

The review editor gives access to all the information about the review. It is organized along 3 main tabs:

  • History - The history of the review and all the files that have changed;
  • Message - The message of the review, the committer, parent commit id;
  • Details - General information on the review such as the list of reviewers, conflicting reviews, related changes, etc.

EGerritEditor1.0.png

Workflows to perform a review

The following section highlight two main workflows used when doing a review. We are preseting those as a support to introduce the fonctionalities available. However, know that the tool does not prevent you to any of these features, if you workflow does not match.

Review first

The "review first" workflow covers the case where the reviewer starts the review by looking at the files that have changed through the compare editor. Such a user will open the review, look at the list of files from the most recent revision, and then will use the compare editor to go from one file to the next.

Checkout first

The "checkout first" workflow covers the case where the reviewer starts the review by checking out the review in the Eclipse workspace. From there, the user navigates to the files that have been changed, and add comments directly from the Eclipse editors (e.g. from the java file editor).

Features

Commenting in the compare editor

EGerrit supports the addition of comments directly from the compare editor. Once the review editor is opened, go to the "History tab" and select the file you want to compare. Once in the compare editor, simply start typing comment in the file.

Compare1.0.png

Markers and quickfixes

EGerrit makes it easy to see gerrit comments while you are editing your code by adding markers to the commented files. This option can be enabled manually by selecting the "Activate Comment Markers" option on the upper-right corner of the editor. It is also automatically enabled when the review is checked-out or cherry-picked in the workspace.

All the EGerrit markers have a quickfix. This gives you the ability to easily reply to a comment, delete a draft comment, etc.

Markers1.0.png

Commenting from an Eclipse editor

It is possible to add a gerrit comment directly from a normal Eclipse editor (e.g. java editor, c/c++ editor, etc.). This feature is only enabled when the "Activate Comment Markers" option of a review is enabled. When this is done, right click in the left margin of the editor and chose the "Add Gerrit comment" entry from the context menu. This will open a dialog where you can enter your comment.

MarkersInEditor1.0.png

Check-out/cherry-pick the change in the workspace

EGerrit makes it really easy for you to bring a change into the workspace. Open the review, click the "Download" button in the lower section of the editor and chose between cherry-pick or check-out.

Back to the top