MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / UpdateFile

Method UpdateFile

CodeFormatServer/src/VFS/VirtualFileSystem.cpp:6–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4}
5
6void VirtualFileSystem::UpdateFile(std::string_view uri, const lsp::Range &range, std::string &&text) {
7 std::string uriString(uri);
8 auto opFileId = _uriDB.Query(uriString);
9 if (!opFileId.has_value()) {
10 auto fileId = _fileDB.AllocFileId();
11 opFileId = fileId;
12 _uriDB.Input(uriString, std::move(fileId));
13 }
14
15 UpdateFile(opFileId.value(), range, std::move(text));
16}
17
18void VirtualFileSystem::UpdateFile(std::string_view uri, std::string &&text) {
19 std::string uriString(uri);

Callers 2

OnDidChangeMethod · 0.80
OnDidOpenMethod · 0.80

Calls 14

VirtualFileClass · 0.85
LineColClass · 0.85
AllocFileIdMethod · 0.80
ApplyFileUpdateMethod · 0.80
GetLineIndexMethod · 0.80
QueryMethod · 0.45
InputMethod · 0.45
valueMethod · 0.45
GetOffsetMethod · 0.45
sizeMethod · 0.45
capacityMethod · 0.45
reserveMethod · 0.45

Tested by

no test coverage detected