MCPcopy Create free account
hub / github.com/docker/docker-language-server / Write

Method Write

internal/pkg/document/manager.go:173–177  ·  view source on GitHub ↗

Write creates or replaces the contents of the file for the given URI. True will be returned if the document's syntax tree has changed.

(ctx context.Context, u uri.URI, identifier protocol.LanguageIdentifier, version int32, input []byte)

Source from the content-addressed store, hash-verified

171// Write creates or replaces the contents of the file for the given URI.
172// True will be returned if the document's syntax tree has changed.
173func (m *Manager) Write(ctx context.Context, u uri.URI, identifier protocol.LanguageIdentifier, version int32, input []byte) (bool, error) {
174 m.mu.Lock()
175 defer m.mu.Unlock()
176 return m.write(ctx, u, identifier, version, input)
177}
178
179func (m *Manager) write(ctx context.Context, u uri.URI, identifier protocol.LanguageIdentifier, version int32, input []byte) (bool, error) {
180 changed, err := m.parse(ctx, u, identifier, version, input)

Callers 15

TestIncludedPathsFunction · 0.45
TestIncludedFilesFunction · 0.45
TestWriteFunction · 0.45
TextDocumentDidOpenMethod · 0.45
recordAnalysisMethod · 0.45
TestInlineCompletionFunction · 0.45
TestInlineCompletion_WSLFunction · 0.45
testDefinition_WSLFunction · 0.45
TestInlayHintFunction · 0.45
TestInlayHint_WSLFunction · 0.45

Calls 1

writeMethod · 0.95

Tested by 15

TestIncludedPathsFunction · 0.36
TestIncludedFilesFunction · 0.36
TestWriteFunction · 0.36
TestInlineCompletionFunction · 0.36
TestInlineCompletion_WSLFunction · 0.36
testDefinition_WSLFunction · 0.36
TestInlayHintFunction · 0.36
TestInlayHint_WSLFunction · 0.36
TestCompletionFunction · 0.36
TestCompletion_WSLFunction · 0.36