mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +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:
parent
935c7b2f4b
commit
e0f1c237d2
15 changed files with 83 additions and 39 deletions
|
@ -10,29 +10,25 @@
|
|||
#include <AK/HashMap.h>
|
||||
#include <AK/Noncopyable.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibCpp/Parser.h>
|
||||
|
||||
namespace HackStudio {
|
||||
|
||||
struct ToDoEntryPair {
|
||||
String filename;
|
||||
String comment;
|
||||
};
|
||||
|
||||
class ToDoEntries {
|
||||
AK_MAKE_NONCOPYABLE(ToDoEntries);
|
||||
|
||||
public:
|
||||
static ToDoEntries& the();
|
||||
|
||||
void set_entries(const String& filename, const Vector<String>&& entries);
|
||||
void set_entries(String const& filename, Vector<Cpp::Parser::TodoEntry> const&& entries);
|
||||
|
||||
Vector<ToDoEntryPair> get_entries();
|
||||
Vector<Cpp::Parser::TodoEntry> get_entries();
|
||||
|
||||
Function<void()> on_update = nullptr;
|
||||
|
||||
private:
|
||||
ToDoEntries() = default;
|
||||
HashMap<String, Vector<String>> m_document_to_entries;
|
||||
HashMap<String, Vector<Cpp::Parser::TodoEntry>> m_document_to_entries;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue