* Instead of hardcoding 1000, store the number in the VcsLogSettings.
Maybe it will be exposed in the UI to let users customize this value.
* Make VcsLogProvider.readFirstBlock() accept the number of commits
as a parameter instead of taking the stored value: sometimes we
will need to load more than defined in the settings.
I. Summary
We are able to filter graph by branches: not-wanted branches will be
just hidden with all their commits (unless they belong to a branch
that is to be shown).
We are not able to filter graph by other details yet: filtering, say,
by user can make "holes" in the graph, and we are not ready to
support this now.
Therefore, if user filters just by branch, we continue to show the
graph to him, but if he switches on a filter which is not supported
by graph (user, full-text), we turn the graph off by substituting the
TableModel with NoGraphTableModel which just shows commit subject in
the first column.
II. UI
Copy the same UI as it were in the old Git Log: a text field for
full-text search, popup menus for filtering by branch and by user.
Structure filter is not implemented yet.
The code of these classic-style filters seems to be tighly connected
with the old Log infrastructure => they are reimplemented from scratch.
Add a few niceties to popup controls: let them be focusable,
draw the focus border around them, make them keyboard friendly.
III. Details
VcsLogFilterer:
* VcsLogFilterer applies filters to the log. At first applies to the
graph (to be able to filter by branch), then it applies other
filters to details.
* The whole graph which was built can be filtered by branch. However
details only of the recent commits are filtered by text/user, because
details of older commits are not available.
Get these details via VcsLogDataHolder#getTopCommitDetails().
* TODO: If there will be no or little results, we should load more
commit details from the VCS. This will be implemented later.
VcsLogUI:
* Don't store the table model in VcsLogUI: it can be applied to the
table at once.
* To keep filtering after refresh, apply filters instead of just
creating new model.
Some filters will be unable to work on graph, therefore we introducing
special renderer and special table model for them.
* Move common stuff to the AbstractVcsLogTableModel.
* Introduce NoGraphTableModel. Just store the list of commits there.
There will be not many of them, performance should be OK.
* Fix the Root renderer in the VcsLogGraphTable to get the root from
value, not from the node.
Check if the node of the given hash is visible.
Delegate to the BranchVisibleNodes and walk through the visible nodes
there. Iterating seems to be ok here, however if profiling will show
the slowdown, it can be rewritten to use a map.
Will be used in filtering.
This structure is needed for future filters.
It existed before, but was accidentally removed because it wasn't
used at that time.
Move common methods from GraphCommitCellRender to the
AbstactPaddingCellRender.
* Store details of the "top commits" (latest ones) in a separate map
to make it always available even if DataGetter's cache overflows.
* Remember top N commits in LogData for two reasons:
- to correctly determine the size of the log to be built into
DataPack (to make sure that user gets only new commits after
refresh, without hiding older ones).
- to make them available for future filters implementation.
Encapsulate all information about the log data into a separate LogData.
VcsLogDataHolder is thread-safe, since all write-operations are
performed from a single sequential background queue,
and myLogData is substituted by new object on every change.
Previously the LogData it contained only the full log,
now it contains either full log, or the first part of it until the
full log is loaded; the DataPack built on this log; later it will
contain more.
Temporary remove the code which tried to guess the number of
top-commits which should be passed to DataPack.build: it is
incorrect, we have to remember this number per root. This will be
fixed in the next commit.
* Instead of searching for references each time, prepare the MultiMap
Hash -> Collection<VcsRef> in the RefsModel constructor.
* Remove myRefs and getAllRefs() since they are not used
(the only caller is unused).
* Change List<VcsRef> to Collection<VcsRef>: collection is actually
what is needed, because references are (and should be) sorted by
particular VcsLogRefManagers.