1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:27:35 +00:00

HackStudio: Make TODO entries clickable

Now you can click a TODO entry to set focus on that position of that
file.
This commit is contained in:
Federico Guerinoni 2021-06-01 23:54:55 +02:00 committed by Linus Groh
parent 935c7b2f4b
commit e0f1c237d2
15 changed files with 83 additions and 39 deletions

View file

@ -14,20 +14,20 @@ ToDoEntries& HackStudio::ToDoEntries::the()
return s_instance;
}
void ToDoEntries::set_entries(const String& filename, const Vector<String>&& entries)
void ToDoEntries::set_entries(String const& filename, Vector<Cpp::Parser::TodoEntry> const&& entries)
{
m_document_to_entries.set(filename, move(entries));
if (on_update)
on_update();
}
Vector<ToDoEntryPair> ToDoEntries::get_entries()
Vector<Cpp::Parser::TodoEntry> ToDoEntries::get_entries()
{
Vector<ToDoEntryPair> ret;
for (auto& it : m_document_to_entries)
Vector<Cpp::Parser::TodoEntry> ret;
for (auto& it : m_document_to_entries) {
for (auto& entry : it.value)
ret.append({ it.key, entry });
ret.append({ entry.content, it.key, entry.line, entry.column });
}
return ret;
}