We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9db6704 commit d8fbd7cCopy full SHA for d8fbd7c
1 file changed
Tool/Sources/FocusedCodeFinder/ActiveDocumentContext.swift
@@ -80,6 +80,21 @@ public struct ActiveDocumentContext {
80
self.includes = includes
81
self.focusedContext = focusedContext
82
}
83
+
84
+ public static func empty() -> ActiveDocumentContext {
85
+ .init(
86
+ documentURL: .init(fileURLWithPath: "/"),
87
+ relativePath: "",
88
+ language: .builtIn(.swift),
89
+ fileContent: "",
90
+ lines: [],
91
+ selectedCode: "",
92
+ selectionRange: .outOfScope,
93
+ lineAnnotations: [],
94
+ imports: [],
95
+ includes: []
96
+ )
97
+ }
98
99
public mutating func moveToFocusedCode() {
100
moveToCodeContainingRange(selectionRange)
0 commit comments