Close removes a document from the manager. This method is called when the client sends a textDocument/didClose notification. It removes the document from the internal map and releases associated resources. Parameters: - uri: Document URI to close and remove Thread Safety: This method uses a write
(uri string)
| 239 | // Once closed, the document must be re-opened with Open() before it can be |
| 240 | // accessed again. Attempting to Update() or Get() a closed document will fail. |
| 241 | func (dm *DocumentManager) Close(uri string) { |
| 242 | dm.mu.Lock() |
| 243 | defer dm.mu.Unlock() |
| 244 | delete(dm.documents, uri) |
| 245 | } |
| 246 | |
| 247 | // Get retrieves a copy of a document to avoid race conditions |
| 248 | // The returned document is a snapshot and modifications won't affect the original |
no outgoing calls