Vcs: Jump to the current source line in Fossil Annotate editor

* Keep track of the current source line number and pass it to Annotate
  action.
* Add a 'List Versions' toggle in Annotate editor to prepend a list of
  commits that make up the annotated source.
* By default do not show the version list so that annotated line number
  could be matched to the source line.

NOTE: VcsBaseEditorWidget::configurationWidget() query is no longer
available, yet Fossil client needs it in order to process the effective
arguments. So we re-implement it in FossilEditorWidget sub-class.

Change-Id: Idc4c21d074ccf4e1c6d041cce2abceb78665c8f2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Artur Shepilko
2017-04-20 02:21:51 -05:00
parent ac8005190d
commit 8cc9b5c57d
6 changed files with 127 additions and 44 deletions

View File

@@ -265,7 +265,8 @@ void FossilPlugin::annotateCurrentFile()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return);
m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile());
const int lineNumber = VcsBase::VcsBaseEditor::lineNumberOfCurrentEditor(state.currentFile());
m_client->annotate(state.currentFileTopLevel(), state.relativeCurrentFile(), QString(), lineNumber);
}
void FossilPlugin::diffCurrentFile()