@@ -42,7 +42,8 @@ extension EmptyViewController {
4242 stackView. orientation = . vertical
4343 stackView. distribution = . fill
4444 stackView. addView ( scrollableEditor, in: . center)
45- stackView. addView ( NSButton ( title: " Replace Sidebar Contents " , target: self , action: #selector( replaceSidebarContents ( _: ) ) ) , in: . center)
45+ stackView. addView ( NSButton ( title: " Fill Sidebar " , target: self , action: #selector( fillSidebar ( _: ) ) ) , in: . center)
46+ stackView. addView ( NSButton ( title: " Reload Sidebar " , target: nil , action: #selector( MasterViewController . reloadSidebar ( _: ) ) ) , in: . center)
4647 stackView. addView ( NSButton ( title: " Expand All Items " , target: nil , action: #selector( MasterViewController . expandAllItems ( _: ) ) ) , in: . center)
4748 stackView. addView ( NSButton ( title: " Collapse All Items " , target: nil , action: #selector( MasterViewController . collapseAllItems ( _: ) ) ) , in: . center)
4849 stackView. setHuggingPriority ( . fittingSizeCompression, for: . horizontal)
@@ -71,7 +72,7 @@ extension EmptyViewController {
7172private extension EmptyViewController {
7273
7374 /// Replaces the whole tree with the given contents.
74- @IBAction func replaceSidebarContents ( _ sender: Any ? ) {
75+ @IBAction func fillSidebar ( _ sender: Any ? ) {
7576 guard let textView = scrollableEditor. documentView as? NSTextView else { return }
7677 var snapshot : DiffableDataSourceSnapshot < MasterItem > = . init( )
7778 let lines = textView. string. components ( separatedBy: . newlines)
0 commit comments