ui: Added on-screen search feature (issue #79)
* Use menu action "Edit -> Find in View" or Ctrl + D * UI displayed as search bar at bottom of main window * Hide search bar with ECS or close button * Entering a query searches in name of graph nodes and code contents of code view * Use Enter to iterate through matches, well move match into view in graph and code view * Checkboxes allow for adding/removing results for certain views * Create Bookmark shortcut is now CTRL + S bug id = 79
This commit is contained in:
@@ -10,10 +10,12 @@ int locationTypeToInt(LocationType type)
|
||||
return 1;
|
||||
case LOCATION_LOCAL_SYMBOL:
|
||||
return 2;
|
||||
case LOCATION_FULLTEXT:
|
||||
return 3;
|
||||
case LOCATION_ERROR:
|
||||
return 3;
|
||||
case LOCATION_FULLTEXT_SEARCH:
|
||||
return 4;
|
||||
case LOCATION_SCREEN_SEARCH:
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +30,11 @@ LocationType intToLocationType(int value)
|
||||
case 2:
|
||||
return LOCATION_LOCAL_SYMBOL;
|
||||
case 3:
|
||||
return LOCATION_FULLTEXT;
|
||||
case 4:
|
||||
return LOCATION_ERROR;
|
||||
case 4:
|
||||
return LOCATION_FULLTEXT_SEARCH;
|
||||
case 5:
|
||||
return LOCATION_SCREEN_SEARCH;
|
||||
}
|
||||
return LOCATION_TOKEN;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,9 @@ enum LocationType
|
||||
LOCATION_TOKEN,
|
||||
LOCATION_SCOPE,
|
||||
LOCATION_LOCAL_SYMBOL,
|
||||
LOCATION_FULLTEXT,
|
||||
LOCATION_ERROR
|
||||
LOCATION_ERROR,
|
||||
LOCATION_FULLTEXT_SEARCH,
|
||||
LOCATION_SCREEN_SEARCH
|
||||
};
|
||||
|
||||
int locationTypeToInt(LocationType type);
|
||||
|
||||
@@ -177,7 +177,7 @@ bool SourceLocation::isScopeLocation() const
|
||||
|
||||
bool SourceLocation::isFullTextSearchMatch() const
|
||||
{
|
||||
return m_type == LOCATION_FULLTEXT;
|
||||
return m_type == LOCATION_FULLTEXT_SEARCH;
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& ostream, const SourceLocation& location)
|
||||
|
||||
@@ -557,7 +557,7 @@ std::shared_ptr<SourceLocationCollection> PersistentStorage::getFullTextSearchLo
|
||||
Id locationId = ~(~Id(0) >> 1) + collection->getSourceLocationCount() + 1;
|
||||
|
||||
collection->addSourceLocation(
|
||||
LOCATION_FULLTEXT,
|
||||
LOCATION_FULLTEXT_SEARCH,
|
||||
locationId,
|
||||
std::vector<Id>(),
|
||||
filePath,
|
||||
|
||||
Reference in New Issue
Block a user