ui: Added shortcuts for navigating to next and previous reference in code view

* Added new class QtCodeNavigator between QtCodeView and QtCodeFileList that handles active ids and navigation
* Pass all files as initially collapsed to code view and decide in QtCodeNavigator which ones show content
* Rewrote requesting of active snippet display to top down approach
* Display other locations focused when active location changes
* Show corresponding edges when navigating references
This commit is contained in:
Eberhard Graether
2016-08-09 13:29:14 +02:00
parent 210c5b1245
commit d0a063a3b6
32 changed files with 1037 additions and 599 deletions
+8 -2
View File
@@ -480,8 +480,11 @@ std::shared_ptr<TokenLocationCollection> PersistentStorage::getFullTextSearchLoc
if ( addHit )
{
// Set first bit to 1 to avoid collisions
Id locationId = ~(~size_t(0) >> 1) + collection->getTokenLocationCount();
collection->addTokenLocation(
collection->getTokenLocationCount(),
locationId,
0,
filepath,
location.startLineNumber,
@@ -1012,8 +1015,11 @@ std::shared_ptr<TokenLocationCollection> PersistentStorage::getErrorTokenLocatio
const StorageError& error = storageErrors[i];
if (error.fatal || error.indexed || showExternalNonFatalErrors)
{
// Set first bit to 1 to avoid collisions
Id locationId = ~(~size_t(0) >> 1) + i;
errorCollection->addTokenLocation(
i, i, error.filePath, error.lineNumber, error.columnNumber, error.lineNumber, error.columnNumber
locationId, i, error.filePath, error.lineNumber, error.columnNumber, error.lineNumber, error.columnNumber
)->setType(LOCATION_ERROR);
errors->push_back(ErrorInfo(error.message, error.filePath, i, error.fatal));
}