logic: preselecting SearchNodes for autocompletion by prefiltering the Graph with the entered Query
This change only shows matches in the autocompletion list that are prefiltered by the already entered query. The autocompletion now also shows up after an operator of type . or > has been entered to show an alphabetical list of possible tokens.
This commit is contained in:
@@ -18,7 +18,10 @@ void SearchController::handleMessage(MessageActivateToken* message)
|
||||
{
|
||||
if (!m_ignoreNextMessageActivateToken && message->tokenId)
|
||||
{
|
||||
getView()->setText(m_graphAccess->getNameForNodeWithId(message->tokenId));
|
||||
std::string name = m_graphAccess->getNameForNodeWithId(message->tokenId);
|
||||
std::stringstream ss;
|
||||
ss << '"' << name << ',' << message->tokenId << '"';
|
||||
getView()->setText(ss.str());
|
||||
}
|
||||
|
||||
m_ignoreNextMessageActivateToken = false;
|
||||
@@ -55,8 +58,8 @@ void SearchController::handleMessage(MessageSearch* message)
|
||||
|
||||
void SearchController::handleMessage(MessageSearchAutocomplete* message)
|
||||
{
|
||||
LOG_INFO("autocomplete string: \"" + message->query + "\"");
|
||||
getView()->setAutocompletionList(m_graphAccess->getAutocompletionMatches(message->query));
|
||||
LOG_INFO("autocomplete string: \"" + message->word + "\"");
|
||||
getView()->setAutocompletionList(m_graphAccess->getAutocompletionMatches(message->query, message->word));
|
||||
}
|
||||
|
||||
SearchView* SearchController::getView()
|
||||
|
||||
Reference in New Issue
Block a user