@@ -53,8 +53,10 @@ class DocumentationWindowController: NSWindowController {
5353 name: . MenuFindAction,
5454 object: nil )
5555 }
56+ }
5657
57- private func setupToolbar( ) {
58+ private extension DocumentationWindowController {
59+ func setupToolbar( ) {
5860 let toolbar = NSToolbar ( identifier: " DocumentationWindowToolbar " )
5961 toolbar. allowsUserCustomization = true
6062 toolbar. autosavesConfiguration = true
@@ -68,9 +70,13 @@ class DocumentationWindowController: NSWindowController {
6870 }
6971 }
7072
73+ @objc func openDocumentationInBrowser( ) {
74+ NSWorkspace . shared. open ( documentation. url)
75+ }
76+
7177 // MARK:- NotificationCenter observers
7278
73- @objc private func observeViewerState( ) {
79+ @objc func observeViewerState( ) {
7480 guard let dvc = documentationViewController else { return }
7581
7682 if dvc. viewerState != . ready {
@@ -81,22 +87,22 @@ class DocumentationWindowController: NSWindowController {
8187 dvc. useNativeScrollbars ( true )
8288 }
8389
84- @objc private func observeDocumentTitle( ) {
90+ @objc func observeDocumentTitle( ) {
8591 guard let dvc = documentationViewController else { return }
8692 self . window? . title = dvc. documentTitle ?? " DevDocs "
8793 }
8894
89- @objc private func observeDocumentCategory( ) {
95+ @objc func observeDocumentCategory( ) {
9096 guard let dvc = documentationViewController else { return }
9197 self . window? . subtitle = dvc. documentCategory ?? " "
9298 }
9399
94- @objc private func observeDocumentURL( ) {
100+ @objc func observeDocumentURL( ) {
95101 guard let dvc = documentationViewController else { return }
96102 self . documentation. url = dvc. documentURL
97103 }
98104
99- @objc private func observeMenuFindAction( ) {
105+ @objc func observeMenuFindAction( ) {
100106 guard let window = self . window else { return }
101107 if !window. isKeyWindow {
102108 return
@@ -106,12 +112,6 @@ class DocumentationWindowController: NSWindowController {
106112 }
107113}
108114
109- private extension DocumentationWindowController {
110- @objc func openDocumentationInBrowser( ) {
111- NSWorkspace . shared. open ( documentation. url)
112- }
113- }
114-
115115// MARK:- DocumentationViewDelegate
116116extension DocumentationWindowController : DocumentationViewDelegate {
117117 func selectFileToOpen( _ parameters: OpenPanelParameters , completionHandler: @escaping ( [ URL ] ? ) -> Void ) {
0 commit comments