Support to retrieve project plugin config by ProjectState

If the caller has a ProjectState already in hand there is no need to
look it up from the project cache. Then there is no need to handle a
NoSuchProjectException.

Change-Id: Ic4ea6b016d5f5a634db1fcec8c6df88d4ec0244d
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Support null as default value when getting string from plugin config

Objects.firstNonNull(String, String) throws a NullPointerException if
both arguments are null.

Change-Id: I9c19ee2a4d8b3e39e549a81220b318d244f1e108
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Support to update project plugin configuration

Change-Id: I7c524f732204da98e116f906c461aa0e64977e3c
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Support to configure default submit type for newly created projects

Bug: issue 2257
Change-Id: If65a15c1f2928d26ffb2ab6fb12acbdc9b2cdda8
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Allow user names that start with a numerical value

That means it allows numerical only user names which
helps to setup Gerrit with Active Directory.

Change-Id: I34a2b0ac2fb4c42adaadf30723a41fe0175e0b6c
Signed-off-by: Eryk Szymanski <eryksz@google.com>
ChangeScreen2: Add one line padding below History

This prevents the "Press ? to view keyboard shortcuts" from being
right up against the last message.

Change-Id: I550ff3f942a5965231e850be0ad9d6123eb6648d
(cherry picked from commit c737d282fa51f9d2cf8a451623c6a536c98feaec)
ChangeScreen2: Add padding to collapsed history

2px above/below each collapsed summary line makes it much easier to
read the text, as the lines blur together less easily to the reader.

With an additional 4px in height available increase the avatar in the
collapsed state to be 20px instead of 16px.  This makes it a bit
easier to resolve some avatar images and identify users.  Position the
avatar over the border in the collapsed state to prevent artifacting
the rounded edge.

Change-Id: I5ba9820a5b084f9193d6faa9b4088d0080d19fa7
For related changes do not rely on current revision being returned

In order to display the related changes we need to know the current
revision. Although the current revision is requested it can happen
that it is not returned by the server. In this case the UI failed to
display the related changes for that tab (it showed the progress bar
and the 'Working...' label never disappeared). Fix the code so that we
can handle changes for which the current revision is not set. These
changes will simply be ignored.

Ie465a182267c39d7fed07921c2271fa5544a8ed2 is an example for a change
which doesn't return a current revision for me although I requested
it. For Id20e567e5c5d5b3d851ca5cda9bde01ac01c9967 it can be seen how
the "Conflicts With" tab cannot display the conflicting changes due to
that change.

Change-Id: Icf32ce8df213beb7f15be1b318be025c7cc8e872
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
ChangeScreen2: Update the documentation with recently made changes

Change-Id: I939710ed7c8c96c51dabb0c013093c9c0fda7bd6
Merge "ChangeScreen2: Add padding to collapsed history"
Quote topic name in same topic query

Topic names may contain whitespace. This is why
we need to quote the topic name in the query.

Change-Id: I0ce6a8ca57cec987ddeeaeed71cee757dcb9d17b
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Do not show current change in Same Topic tab

Especially it is unneeded to show the Same Topic tab if a change has a
topic but no other change is using the same topic. If the current
change is excluded the Same Topic branch will not be shown in this
case.

Change-Id: I8b09250a8eea320206d506d470a09379c390eca7
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "For related changes do not rely on current revision being returned"
Merge "ChangeScreen2: Update the documentation with recently made changes"
Show tab with conflicting changes only if secondary index is enabled

This tab makes use of the 'conflicts' operator which is only supported
if a secondary index is enabled.

Change-Id: I25cc023e10f10a80efce12c1a3e62a65cb8940f3
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Show branch for changes in Cherry-Picks tab in front

The branch name is the important information here since the
cherry-picked commits likely have the same subject. Especially for
changes with a long subject it is important to see the branch name in
front because otherwise it might not be visible.

Change-Id: I6d7e37415ba8fed6f94fe9d343a183c2b57901af
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Merge "Show branch for changes in Cherry-Picks tab in front"
Merge "Support to configure default submit type for newly created projects"
ChangeScreen2: Move star to far right of status bar

Web applications tend to place the "star action" for an object on
either the far left or the far right. Placing it in the center makes
it hard to locate.

Move the star onto the far right of the status bar.  Placing it on the
far left offsets the commit message subject from the commit message in
an ugly way, so far left position is not an option.

Change-Id: Ia477fbfe08fae7b08065d2c2918eb34558f1d89a
Add reply button to each cover message comment

Reply button in cover message comment would allow to reply onto a
specific comment. When pressed a new cover message comment would
be created with the master cover message copied and '>' prefixes
inserted.

Feature: issue 592
Change-Id: I7ae221d8de09f2b643e3564ffddb03a9a2ceadf6