Skip to content

Commit 5d6bd73

Browse files
committed
Remove unused content from Environment.swift
1 parent 1a4d5b1 commit 5d6bd73

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

Tool/Sources/Environment/Environment.swift

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -107,29 +107,6 @@ public enum Environment {
107107
}
108108
throw FailedToFetchFileURLError()
109109
}
110-
111-
public static var fetchFocusedElementURI: () async throws -> URL = {
112-
guard let xcode = ActiveApplicationMonitor.shared.activeXcode
113-
?? ActiveApplicationMonitor.shared.latestXcode
114-
else { return URL(fileURLWithPath: "/global") }
115-
116-
let application = AXUIElementCreateApplication(xcode.processIdentifier)
117-
let focusedElement = application.focusedElement
118-
var windowElement: URL {
119-
let window = application.focusedWindow
120-
let id = window?.identifier.hashValue
121-
return URL(fileURLWithPath: "/xcode-focused-element/\(id ?? 0)")
122-
}
123-
if focusedElement?.description != "Source Editor" {
124-
return windowElement
125-
}
126-
127-
do {
128-
return try await fetchCurrentFileURL()
129-
} catch {
130-
return windowElement
131-
}
132-
}
133110
}
134111

135112
public extension FileManager {

0 commit comments

Comments
 (0)