Document how outdated changes are shown in the related change list

Change-Id: I6fe812ceadd3e10d5db6865f4d893d2ee41f1c68
SideBySide2: Remove Alt-U binding to lose focus

This is an undocumented binding that nobody knows about.  Most users
either grab the mouse, or hit "u" to return to the change screen
if the keyboard action they want isn't responding in a focused CM3.

Change-Id: I82cec78c4999e98b6f4205fadd145f6a934cc804
Don't pass ReviewDb to ChangeData static methods

Assume that all of the ChangeDatas passed to these methods are from
the same context and therefore use the same database handle, so pick
one to use from the passed-in ChangeDatas.

Change-Id: Ic37cba1bd3fbfb987857b86fb67aaaa6c9aaba04
Tweak wording for GC command status messages

Make the status messages returned by running a garbage collection
full sentences.  This makes them a little easier to read.

Change-Id: I55beffd85f95e2abfcc56acf39ff044813ce20f8
Always pass non-null ChangeData into Prolog environment

Injecting arbitrary objects via StoredValues is possible but
cumbersome. The ChangeData passed in is useful because it can lazily
compute its own fields without passing in additional objects. The
only problem was it might have been null; fix it so that is not the
case.

This requires in turn allowing ChangeControl to produce non-null
ChangeDatas in its method, which is enough to tip the scales in favor
of having a ChangeControl.AssistedFactory.

Change-Id: I6bac3cfac52b31ddaf36e1504ed229a0b188b6f4
SideBySide2: Refactor keyboard bindings for CM3 instances

Move the simple binding calls up with the others, leaving
the large block of inline Runnable together.

Clarify the move to other side runnable construction by passing
the DisplaySide that will be moved to instead of abusing boolean
true to mean "left" and boolean false to mean "right".

When moving to the same CM3 instance as the one getting a binding,
install an empty Runnable instead of one that is disabled.

Change-Id: I00c65235794f7c357ec4d1c7549d7ca463f4449a
SideBySide2: Clarify diffChunkNav direction

Instead of abusing a boolean true as previous and false as next,
define an enum with symbols PREV and NEXT, making it more clear
which direction navigation will go in the file.

Change-Id: I61f2279aa1239ce88727235d88e125fc0cec1ee9
SideBySide2: Move [,] event handling into header

The header object knows how to manage the navigation. Instead of
digging into there from anonymous Runnables in SideBySide2, let
Header create the Runnable, hiding some of the inner details of
Header from the event binding code.

This shortens the event binding code for a CM3 a bit more, making
the table of key bindings slightly easier to read.

Change-Id: Ia3c999f37001c51d5c36d8eaff02f8bdc725773a
SideBySide2: Extract comment loading to its own helper class

The comment loading and sorting code is somewhat lengthy, and the
lists aren't used beyond the initial display() call. Pull related
code into its own helper that can be discarded after the view has
been created.

Change-Id: I85bfd52b0c7b5beda01e14060d4ed2629d25c6e7
SideBySide2: Refactor comment management to new top level class

Yank all of the code related to comment management out of SideBySide2
and into its own new top level class. This moves about 500 lines
of code from a 1800 line class to a new 400 line class, which may
make it easier to follow SideBySide2.

Change-Id: Ie24b3e3af38a9dea38a756fc5b635f1cc54f7f8a
SideBySide2: Refactor skip code to new top level class

Pull out the ~120 lines related to tracking skip bars and the
regions they collapse into a new top level class in the same
package, reducing some of the complexity of SideBySide2.

Change-Id: Ic5f3245acabc84a62499a8bcf749352338c16563
SideBySide2: Refactor coloring logic to new top level class

Break out the code used to color modified regions, moving it all to a
new top level class in the package.  This class unfortunately also has
to keep track of the LineMapper and the padding widgets.

Change-Id: Id72d36cbf1d3bd3fe9df220521901ec50b4c5ddb
SideBySide2: Remove finished TODO about GlobalKey bindings

All major keys are managed in both GlobalKey and CM3,
so drop the TODO.

Shuffle the STOP_PROPAGATION DomHandler down to after the UI has been
created, as this just reads a little more clearly.  Memember fields
are initialized, the UI is initialized, and the handler is added.

Change-Id: Ic184bd14302f4aff70bd871fc3647c052510f09d
Merge changes Ic184bd14,Id72d36cb,Ic5f3245a,Ie24b3e3a,I85bfd52b,Ia3c999f3,I61f2279a,I00c65235,I82cec78c

* changes:
  SideBySide2: Remove finished TODO about GlobalKey bindings
  SideBySide2: Refactor coloring logic to new top level class
  SideBySide2: Refactor skip code to new top level class
  SideBySide2: Refactor comment management to new top level class
  SideBySide2: Extract comment loading to its own helper class
  SideBySide2: Move [,] event handling into header
  SideBySide2: Clarify diffChunkNav direction
  SideBySide2: Refactor keyboard bindings for CM3 instances
  SideBySide2: Remove Alt-U binding to lose focus
Merge "Tweak wording for GC command status messages"
SideBySide2: Move "No Differences" to right side of header

On long project and file path names the path information was drawing
overlapped on top of the centered "No Differences" warning. Move
this warning to the far right edge of the header, next to the
navigation buttons.

Drop the font-family from the navigation panel, the widgets are drawn
as image icons and no longer depend on a font to render Unicode
arrows on all platforms. Dropping the font-family rule allows the
"No Differences" text to use the same family as the rest of the page.

Make "No Differences" bold and offset from the arrow group slightly
so it stands out more.

The side gutter is only given 10px by DiffTable.ui.xml, so move
the entire arrow group so the right edge is on the edge of the CM3
instance. The old position was simply wrong and the extra few pixels
can be made available to an incredibly long path name.

Change-Id: I38a312c8523975f9c44578f33891f9362a900c4c
SideBySide2: Do not refocus draft box on redraw

In 44adfee8 focus was automatically transferred to any DraftBox
that was in edit mode when CodeMirror sent the onRedraw event to
the widget. Michael's intent was to auto transfer focus into a
draft after the user scrolled it out of view, and then back in.
This fails in a number of subtle ways.

If more than one draft is editable and visible the user may see focus
transfer to the wrong draft. The behavior is undefined, but probable
that focus will transfer to the draft box positioned at the highest
line number. It depends on the order CM3 fires the redraw events.

Another issue arises from using the search box:

  - create draft on a line.
  - type some text, but do not save.
  - click elsewhere in the file to focus CM3 again.
  - start search with "/".
  - type some text that matches the file.
  - focus suddenly jumps back into the draft box.

CM3 fires a redraw event somewhere during the search process,
and focus is stolen out of the search input box back into the
draft that the user just left. This is horribly confusing.

Revert the auto transfer during widget redraw.

Change-Id: I96bc1d9485b3d6cdf8d8f3d3b2f57fdea8993035
Remove unnecessary blank line in CodeMirror wrapper

Change-Id: I2c4bd4fd1f8b6fc3fd94da8780eed67581937508
Ignore incomplete GitWeb configuration

For the GitWeb configuration it is required that all parameters are
set. If a parameter is missing the GitWeb type is set to null and a
warning is printed into the error log saying that GitWeb got disabled.
However it is not really disabled, but some screens in the WebUI (e.g.
the change screen) fail to load because a NullPointerExeception is hit
due to the GitWeb type being null. It is very difficult to relate the
JavaScript error to the incomplete GitWeb configuration. This problem
occurred now because 79d4ebec49 made two more parameters mandatory.
With this change Gerrit now doesn't try to add GitWebLinks if the
GitWeb type is null.

Change-Id: Ib060ce67e673e2553e7b220532d218ac9e56442b
Fix CodeMirror#create signature in Configuration javadoc

Change-Id: I790e323a60b8ab60b490d292c16de99826182867