mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -6,9 +6,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibCodeComprehension/FileDB.h>
|
||||
#include <LibGUI/TextDocument.h>
|
||||
|
||||
|
@ -17,28 +17,28 @@ namespace LanguageServers {
|
|||
class FileDB final : public CodeComprehension::FileDB {
|
||||
public:
|
||||
FileDB() = default;
|
||||
virtual Optional<String> get_or_read_from_filesystem(StringView filename) const override;
|
||||
virtual Optional<DeprecatedString> get_or_read_from_filesystem(StringView filename) const override;
|
||||
|
||||
RefPtr<const GUI::TextDocument> get_document(String const& filename) const;
|
||||
RefPtr<GUI::TextDocument> get_document(String const& filename);
|
||||
RefPtr<const GUI::TextDocument> get_document(DeprecatedString const& filename) const;
|
||||
RefPtr<GUI::TextDocument> get_document(DeprecatedString const& filename);
|
||||
|
||||
bool add(String const& filename, int fd);
|
||||
bool add(String const& filename, String const& content);
|
||||
bool add(DeprecatedString const& filename, int fd);
|
||||
bool add(DeprecatedString const& filename, DeprecatedString const& content);
|
||||
|
||||
void on_file_edit_insert_text(String const& filename, String const& inserted_text, size_t start_line, size_t start_column);
|
||||
void on_file_edit_remove_text(String const& filename, size_t start_line, size_t start_column, size_t end_line, size_t end_column);
|
||||
String to_absolute_path(String const& filename) const;
|
||||
bool is_open(String const& filename) const;
|
||||
void on_file_edit_insert_text(DeprecatedString const& filename, DeprecatedString const& inserted_text, size_t start_line, size_t start_column);
|
||||
void on_file_edit_remove_text(DeprecatedString const& filename, size_t start_line, size_t start_column, size_t end_line, size_t end_column);
|
||||
DeprecatedString to_absolute_path(DeprecatedString const& filename) const;
|
||||
bool is_open(DeprecatedString const& filename) const;
|
||||
|
||||
private:
|
||||
RefPtr<GUI::TextDocument> create_from_filesystem(String const& filename) const;
|
||||
RefPtr<GUI::TextDocument> create_from_filesystem(DeprecatedString const& filename) const;
|
||||
RefPtr<GUI::TextDocument> create_from_fd(int fd) const;
|
||||
RefPtr<GUI::TextDocument> create_from_file(Core::File&) const;
|
||||
static RefPtr<GUI::TextDocument> create_with_content(String const&);
|
||||
static RefPtr<GUI::TextDocument> create_with_content(DeprecatedString const&);
|
||||
|
||||
private:
|
||||
HashMap<String, NonnullRefPtr<GUI::TextDocument>> m_open_files;
|
||||
String m_project_root;
|
||||
HashMap<DeprecatedString, NonnullRefPtr<GUI::TextDocument>> m_open_files;
|
||||
DeprecatedString m_project_root;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue