mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:47:35 +00:00
HackStudio: Add ClassView tab for viewing classes in a tree structure
This enables the user to view and navigate classes with a TreeView that is updated by the LanguageServer as it parses the code. It offers a new neat way to view the project's structure :^)
This commit is contained in:
parent
5adfcd54d8
commit
f52c3cabcf
7 changed files with 317 additions and 9 deletions
|
@ -200,4 +200,14 @@ void AutocompleteBox::apply_suggestion()
|
|||
m_editor->insert_at_cursor_or_replace_selection(completion);
|
||||
}
|
||||
|
||||
bool AutocompleteProvider::Declaration::operator==(const AutocompleteProvider::Declaration& other) const
|
||||
{
|
||||
return name == other.name && position == other.position && type == other.type && scope == other.scope;
|
||||
}
|
||||
|
||||
bool AutocompleteProvider::ProjectLocation::operator==(const ProjectLocation& other) const
|
||||
{
|
||||
return file == other.file && line == other.line && column == other.column;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -61,6 +61,8 @@ public:
|
|||
String file;
|
||||
size_t line { 0 };
|
||||
size_t column { 0 };
|
||||
|
||||
bool operator==(const ProjectLocation&) const;
|
||||
};
|
||||
|
||||
enum class DeclarationType {
|
||||
|
@ -78,6 +80,8 @@ public:
|
|||
ProjectLocation position;
|
||||
DeclarationType type;
|
||||
String scope;
|
||||
|
||||
bool operator==(const Declaration&) const;
|
||||
};
|
||||
|
||||
virtual void provide_completions(Function<void(Vector<Entry>)>) = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue