Fix: unit test IllegalStateException

Reason is the gerrit.basePath is not configured.

Change-Id: If0888a3d268b0536ac0cfb6dacea675cbd4ea016
Reject inline comments on files that do not exist in the patch set

Bug: issue 2583
Change-Id: I8df23393bc2d311c46a29fb82bca2fa7bf20488a
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Don't try to index empty documentation txt files

If a documentation txt file has no content, parsing the document title
from it in the DocIndexer fails with a NullPointerException:

  Exception in thread "main" java.lang.NullPointerException
    at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
    at java.util.regex.Matcher.reset(Matcher.java:308)
    at java.util.regex.Matcher.<init>(Matcher.java:228)
    at java.util.regex.Pattern.matcher(Pattern.java:1088)
    at DocIndexer.index(DocIndexer.java:117)
    at DocIndexer.invoke(DocIndexer.java:86)
    at DocIndexer.main(DocIndexer.java:163)

Change-Id: Idb4b808847d326ba49c9a2494a95b1cad8eb9406
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Link to project dashboard by default for project links

I8874fd59 changed the project link from ChangeScreen2 to go to the
project's default dashboard. Make other project links, specifically
those using ProjectLink, have the same behavior.

This does lose the functionality of clicking a project name in the
change table linking to a search for changes in the project matching
that change's status. This small loss is outweighed by consistency in
behavior across the application.

Change-Id: I3f6257ecd8d098a2c3ee9680174817664517da61
ChangeScreen2: Include space before 'in Settings' in welcome bar

When logged-in user looks at the change screen for the first time,
they see a notice:

    Welcome to the new change screen! Learn more
    You can revert to the old screenin Settings > Preferences. Got it!

The text starting at "in Settings" has markup

	<span ui:field='settings'> in Settings &gt; Preferences</span>

which has been helpfully rendered as a <span> element containing a
text node starting with "in Settings" and omitting the initial space.
Use a non-breaking space entity to force the space to be included.

Change-Id: I3855aee1e1f80d580a45a921f97831446648b8de
Include gerrit.war in api_{install,deploy}

This patch adds gerrit.war into api_{install,deploy} buck build step.
This allows third party maven based builds depend on gerrit.war
artifact.

Change-Id: I22c8d3339a1647913967e423e45462c2c5c255de
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
Remove unused import of CodeMirror in PreferencesBox

Change-Id: I5bde24b761ca4783704761f48fac23942d4be3d1
ChangeJson: Respect patch set visibility for messages

Messages retrieval doesn't check for patch set visbility and thus
messages for draft patch sets are currently returned back to client.

Cache patch sets for a given change, when all revisions or
messages are requested and only return messages for visible
patch set.

Bug: issue 2622
Change-Id: I7cd465e72554f5f0909d82a25d1b14b9371c12c5
Removed unused methods and fields in JarScanner

Change-Id: Icde15577827644fdc593e677b2aa84fe472f5b95
Renaming JarPlugin to ServerPlugin for future extensions

As we plan to make the server-side plugins more extensible
and potentially implemented with other packaging (directories,
scripting, ...) it does make sense to start renaming it
in order to make the rest of the code more readable.

Change-Id: I78e46072c8c014287b06afb37e1c7b126a2d4c04
Buck: Strip SNAPSHOT suffix in artifact names only for GERRIT repositories

Maven artifact names on Google bucket replacing SNAPSHOT suffix with
timestamp. 731967591ef98ab3c94691ba9dc0f217630dda76 changed this by
preserving the SNAPSHOT suffix. This broke fetching of gwtorm and
gwtjsonrpc and was reverted by 731967591ef98ab3c94691ba9dc0f217630dda76.

This change fixes this for both worlds: stripping it for GERRIT and
GERRIT_API Maven repositories but preserving it for the rest.

Test plan:

maven_jar() is working as expected for the both worlds:

* gwtorm:gwtorm:1.10-SNAPSHOT-20140310.015132-1 (repo = GERRIT)
* org.eclipse.jgit:org.eclipse.jgit:3.4.0-SNAPSHOT (repo = MAVEN_LOCAL)

Change-Id: I5357abe9ad6a40538c444ad70016c8c6d75d8ff3
Improvements in the REST API documentation index page

- Reword the "response codes" section and add a link to the
  relevant HTTP specification.

- Consistently say "is returned" instead of "is used" in response
  descriptions.

- Improve wording of "403 forbidden" response description.

- Reword the authentication section and mention that HTTP basic
  authentication can be used by setting auth.gitBasicAuth.

Change-Id: Id25034267cef668a7d9af82cbdacce744a0e5243
Merge "Buck: Strip SNAPSHOT suffix in artifact names only for GERRIT repositories"
More improvements in the REST API documentation index

- Rewrite the output format section to remove repeated information
  about pretty-printed JSON.

- Replace another instance of "is used" with "is returned".

- Minor fixes in the 405 and 409 response sections.

Change-Id: I150e24d4d39744120f478b912b34e5061f6c93fb
Fix missing commit messages on submodule direct pushes

The commit message in superproject is missing on submodule's
directly pushed changes.

The submitted changes list is empty for directly pushed changes,
as a result, the commit message buffer is initialized to be a
string literal "null". Try to get the full commit message from
the last commit of the submodule if the message buffer is null
or literal "null".

Change-Id: I438a37713019f181c4b0149b3500cb748d63db45
SideBySide2: Give B side full width when A side is hidden

Change-Id: I78b4679ad53b3501741f59344473403022df46ea
SideBySide2: Fix scroll alignment when showing hidden A side

If A is hidden, the user scrolls, and then shows A the lines
did not match up with the B side. Force the A viewport back
to match the B side when it becomes visible.

Change-Id: Ic073c3689f325b8f0805435418634e975fd365de
Merge "ChangeScreen2: Include space before 'in Settings' in welcome bar" into stable-2.9
Merge "Fix missing commit messages on submodule direct pushes"
Merge "ChangeJson: Respect patch set visibility for messages"