This page last changed on Jun 15, 2009 by smaddox.
The Atlassian IntelliJ Connector allows you to conduct Crucible reviews from within IntelliJ IDEA. You can complete the full review lifecycle within IDEA — create a review from your source code, make comments directly against the source code in your editor, view the comments, reply to comments and look at the diffs.
Prerequisites
Please make sure that you have installed the Atlassian IntelliJ Connector, as described in the Installation Guide, and defined at least one Crucible server, as described in the Configuration Guide.
Summary of What You Can Do
Below are the highlights of the functionality supplied by the IntelliJ Connector for conducting Crucible reviews within IDEA. In the list below, each item is linked to the relevant section on this page. Please read the rest of the page for a full reference guide.
Hint: There's more — too many options to document exhaustively here. Click around and try it out 
Watching the Crucible Status Icon and Popup
After you have defined at least one Crucible server in the connector configuration panel, the Crucible status icon is displayed in the status bar. The icon has the following states:
- Grey when there are no reviews awaiting your attention.
- Grey with a green tick
when there is at least one pending review which you have not yet accessed in the Crucible tab.
Screenshot: Crucible status icon in the IDEA status bar

Click the Crucible icon to open the Crucible reviews tab. The icon state will be reset to grey.
In addition to the icon, a popup window notifies you of status changes and comments added to the reviews which affect you.
Screenshot: Crucible review notification

Accessing the Crucible Reviews Tab in IDEA
To open the connector's Crucible reviews tab, you can do one of the following:
- Click the Crucible status icon
in the IDEA status bar.
- Or click the Atlassian Connector control button at the bottom of the IDEA screen:

Then select the Crucible reviews tab in the connector window toolbar:

Using the Crucible Reviews Tab
The Crucible reviews tab shows the reviews matching your selected filters, such as 'To Review', 'Out For Review', etc. You can further group the reviews by server, state, author or project.
Screenshot: Crucible tab in the connector window
Filtering and Grouping the Reviews Displayed
The left-hand pane shows all the reviews in which you are a participant, filtered via the standard Crucible filters (such as 'To Review', 'Out For Review', etc).
- You can select one or more standard Crucible filters in the left-hand pane. The matching reviews are shown in the right-hand pane. Press Ctrl to select more than one filter.
- To define your own custom filter, select 'Custom Filter' at the bottom of the left-hand pane then click the 'Edit' button.
- Choose the grouping of reviews from the 'Group By' dropdown list at the top of the window.
- Then expand and collapse the groups to suit your needs.
Using the Toolbar
The tool bar in the Crucible reviews tab provides the following functionality:
|
Divide the list of Crucible reviews into groups. You can choose:
- None — Display a flat list of reviews, in no particular order.
- State — Display the reviews per review status. For example, this would group all draft reviews under one heading and all open ('Review' status) reviews under another heading.
- Author — Group the reviews according to the person who initiated the review i.e. the author.
- Project — Display the reviews per project.
- Server — Display the reviews per server, if you have defined more than one Crucible server.
|
|
Open the connector configuration panel, either the project settings or the IDE settings. See Configuring your Crucible Options in IDEA. |
|
Refresh the list of reviews by polling your Crucible servers. |
|
Open all the review groups in the Crucible tab, so that you can see the review line items as well as the group headings. |
|
Close all the review groups in the Crucible tab, so that you can see only the group headings. |
|
Open the selected review in an IDEA output tool window. See below. |
|
Open the selected review in your browser, using the Crucible user interface. |
|
Create a new Crucible review. See below. |
|
Quick search for a review. Enter a review key to open the issue in an IDEA output tool window. |
|
Get help on the usage of the Crucible tab (i.e. open this documentation page in your browser). |
|
The search box gives you quick access to a review. Just start typing the review number into the search box at top right of the Crucible reviews tab. The connector will display matching reviews as you type. |
Using the Context Menu for a Review
You can perform the following functions for each line in the list of reviews:
- Double-click a line to open the selected build in an IDEA output tool window. See below.
- Right-click a line to show a popup context menu (pictured in the screenshot above) with actions that you can perform for the selected review:
- Open Review — Open the selected Crucible review in an IDEA window. See below.
- View Review in Browser — Open the selected review in your web browser, using the Crucible user interface.
- Workflow actions, such as Summarize and Close Review and Abandon Review — Move the review through the Crucible workflow statuses. The actions shown here will differ, depending on the current state of the selected review.
- Set Reviewers — Ask people to participate in the review.
Viewing Review Details
From the Crucible reviews tab, described above, you can open a Crucible review in an IDEA output tool window. For example, you can do one of the following:
- Select the review and then click the 'Open Review' icon
, or
- Right-click the review line and then select 'Open Review' from the popup context menu.
The review will open in an IDEA output tool window.
Screenshot: Crucible review window, showing the review details
A green tick next to a reviewer's name means that the reviewer has completed their part of the review.
The tool bar provides the following functionality:
|
Open the selected review in your browser, using the Crucible user interface. |
|
Fetch the latest review details from your Crucible server. |
|
A popup window will appear, allowing you to enter a comment summarising the review and then close the review. |
|
A popup window will appear, showing the review summary information and allowing you to confirm that you want to abandon the review. |
|
Choose the people you want to participate in the review. |
|
Close the review window in IDEA. |
Working with Review Comments in the Output Tool Window
In this section, we discuss the review comments as displayed in an IDEA output tool window. In a later section, you will see how to view and add comments in the IDEA editor.
From the Crucible reviews tab, described above, you can open a Crucible review in an IDEA output tool window:
- Select the review and then click the 'Open Review' icon
, or right-click the review line and then select 'Open Review' from the popup context menu.
- Click the 'Comments' tab.
The review comments will open in an IDEA output tool window.
Screenshot: Crucible review window, showing the review comments
The above screenshot shows:
- A general comment at the top, for the review as a whole.
- A couple of line comments for individual files in the review.
- A popup context menu that appears when you right-click a file name, allowing you to jump to the source code, add comments, open the revision of diff view on the selected file and navigate to the previous and next comments.
Options in the Comments toolbar allow you to do the following:
|
View your local version of the source code that is under review, by opening it in the IDEA editor. |
|
Retrieve the version of the source code that is under review, by getting it from the source repository and then opening it in the IDEA editor. |
|
Open the diff view for review. This option will compare the version of the file under review with the previous version in the repository, to see the changes that are under review. |
|
Add a new review comment, applicable to the selected file. |
|
Edit an existing review comment. |
|
Delete an existing review comment. |
|
Add a new general comment, applicable to the review as a whole. |
|
Move to the previous or the next comment in the review. |
|
Move to the previous or the next difference in the two versions of the selected file. |
|
Select this option to display only the files that already have review comments added to them. |
Other toolbar options, not shown above, allow you to display the comments in a flat view or a tree (hierarchical) view, and to expand and collapse the tree view.
Hint: There's more — too many options to document exhaustively here. Click around and try it out 
Adding a Review Comment in the IDEA Editor
Screenshot: Adding a comment in the editor
To add a comment from within the IDEA editor:
- Make sure you have the appropriate Crucible review open in IDEA. The file in your IDEA editor must be one of the files included in the review.
- Select one or more lines of code in your editor.
- Right-click the selected line(s) of code and select 'Add Crucible Comment'.
Working with Review Comments in the IDEA Editor
Screenshot: Viewing, replying to and editing a comment in the editor

To view an existing review comment within the source editor, click the Crucible icon as shown in the diagram above. You can reply inline, and edit or delete the comment if you have the required permission.
Working with Review Comments in the Diff View
Screenshot: Viewing a comment in the diff view

Click the 'Open Diff for Review' icon as shown in the above diagram, then click the Crucible icon to open review comments in the diff view. You can reply inline, and edit or delete the comment if you have the required permission.
Creating a Review
Below we show you how to create a post-commit review, a pre-commit review and how to create the review while committing your files.
Creating a Post-Commit Review
Screenshot: Creating a post-commit review

Use this feature to ask your team members to review code that has already been committed to the repository.
- Select 'Create Review from Commits' from the Crucible icon in the Crucible reviews toolbar.
- Enter the review objectives and other details.
- Select the reviewers and the changed files for review.
- Click 'Create review'.
Creating a Pre-Commit Review
Screenshot: Creating a pre-commit review

Use this feature to ask your team members to review your code before you commit it to the repository.
- Select 'Create Pre-commit Review' from the Crucible icon in the Crucible reviews toolbar.
- Enter the review objectives and other details.
- Select the reviewers and the changed files for review.
- Click 'Create review'.
 | Comparing the connector with the Crucible web interface Crucible's web interface lets you do reviews on patches, but you must make and upload the patch. The IntelliJ Connector feature works for pre-commit reviews but not for patch-only reviews from within IDEA. This means that the review must be based on a diff applied to existing files in the repository, not a floating patch. Patch-only reviews are supported by the Crucible web interface. |
Creating a Review during Commit
Screenshot: Creating a review during commit

As shown in the above diagram, you can create a review while committing your files.
- IDEA will commit the files for you.
- When the commit makes its way to Crucible, the connector will create the review based on the commit.
Accessing your Crucible Reviews Quickly
The connector provides a number of ways to open a Crucible review quickly:
- Press Shift-Alt-K to see your recently viewed reviews. This works from within the IDEA editor as well as in the Crucible Reviews tab.

- Press Ctrl-Shift-Alt-R (Windows and Linux) or Command-Shift-Alt-R (Mac OS X) to do a quick search for a review. This works from within the IDEA editor as well as in the Crucible Reviews tab.

- Start entering the review key into the search box at top right of the Crucible Reviews tab (see screenshot above). The connector will display matching reviews as you type.

Opening a Review in Crucible from IDEA
Screenshot: Alt-F1 menu in IDEA
The quickest way to open a file in Crucible from within the IDEA editor is:
- Press Alt-F1.
- Select 'Crucible' from the popup menu.
Take a look at our full list of shortcut keys.
RELATED TOPICS
Refer to the Crucible documentation for more information about Crucible reviews.
|