File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
135112public extension FileManager {
You can’t perform that action at this time.
0 commit comments