LibCodeComprehension: Re-organize code comprehension related code

This moves all code comprehension-related code to a new library,
LibCodeComprehension.

This also moves some types related to code comprehension tasks (such as
autocomplete, find declaration) out of LibGUI and into
LibCodeComprehension.
This commit is contained in:
Itamar 2022-05-14 17:09:24 +03:00 committed by Andreas Kling
parent a2c34554cd
commit b35293d945
Notes: sideshowbarker 2024-07-17 10:45:06 +09:00
65 changed files with 685 additions and 491 deletions

View file

@ -22,7 +22,7 @@ public:
__Count
};
explicit ToDoEntriesModel(Vector<Cpp::Parser::TodoEntry> const&& matches)
explicit ToDoEntriesModel(Vector<CodeComprehension::TodoEntry> const&& matches)
: m_matches(move(matches))
{
}
@ -81,7 +81,7 @@ public:
}
private:
Vector<Cpp::Parser::TodoEntry> m_matches;
Vector<CodeComprehension::TodoEntry> m_matches;
};
void ToDoEntriesWidget::refresh()
@ -103,7 +103,7 @@ ToDoEntriesWidget::ToDoEntriesWidget()
m_result_view = add<GUI::TableView>();
m_result_view->on_activation = [](auto& index) {
auto& match = *(Cpp::Parser::TodoEntry const*)index.internal_data();
auto& match = *(CodeComprehension::TodoEntry const*)index.internal_data();
open_file(match.filename, match.line, match.column);
};
}