mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:22:07 +00:00
LanguageServers/Cpp: Use FileDB and AutoCompleteEngine base class
This commit is contained in:
parent
bed06b13f3
commit
02038a0ede
7 changed files with 126 additions and 97 deletions
|
@ -26,10 +26,11 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "AutoCompleteEngine.h"
|
||||
#include "FileDB.h"
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <DevTools/HackStudio/AutoCompleteResponse.h>
|
||||
#include <LibGUI/TextDocument.h>
|
||||
#include <LibIPC/ClientConnection.h>
|
||||
|
||||
#include <DevTools/HackStudio/LanguageServers/LanguageClientEndpoint.h>
|
||||
|
@ -57,16 +58,8 @@ private:
|
|||
virtual void handle(const Messages::LanguageServer::AutoCompleteSuggestions&) override;
|
||||
virtual void handle(const Messages::LanguageServer::SetAutoCompleteMode&) override;
|
||||
|
||||
RefPtr<GUI::TextDocument> document_for(const String& file_name);
|
||||
|
||||
HashMap<String, NonnullRefPtr<GUI::TextDocument>> m_open_files;
|
||||
|
||||
enum class AutoCompleteMode {
|
||||
Lexer,
|
||||
Parser
|
||||
};
|
||||
|
||||
AutoCompleteMode m_auto_complete_mode { AutoCompleteMode::Lexer };
|
||||
FileDB m_filedb;
|
||||
OwnPtr<AutoCompleteEngine> m_autocomplete_engine;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue