File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
Tool/Sources/XcodeInspector Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,22 @@ extension AppDelegate: NSMenuDelegate {
126126 . append ( . text( " Active Workspace: \( inspector. activeWorkspaceURL? . path ?? " N/A " ) " ) )
127127 menu. items
128128 . append ( . text( " Active Document: \( inspector. activeDocumentURL? . path ?? " N/A " ) " ) )
129+
130+ if let focusedWindow = inspector. focusedWindow {
131+ menu. items. append ( . text(
132+ " Active Window: \( focusedWindow. uiElement. identifier) "
133+ ) )
134+ } else {
135+ menu. items. append ( . text( " Active Window: N/A " ) )
136+ }
137+
138+ if let focusedElement = inspector. focusedElement {
139+ menu. items. append ( . text(
140+ " Focused Element: \( focusedElement. description) "
141+ ) )
142+ } else {
143+ menu. items. append ( . text( " Focused Element: N/A " ) )
144+ }
129145
130146 if let sourceEditor = inspector. focusedEditor {
131147 menu. items. append ( . text(
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import Combine
55import Foundation
66
77public class XcodeWindowInspector : ObservableObject {
8- let uiElement : AXUIElement
8+ public let uiElement : AXUIElement
99
1010 init ( uiElement: AXUIElement ) {
1111 self . uiElement = uiElement
You can’t perform that action at this time.
0 commit comments