         menu.items += styleNames.map { NSMenuItem(title: $0, action: action, keyEquivalent: "") }
         
         if let styleName = (self.document as? Document)?.syntaxParser.style.name {
-            self.selectSyntaxPopUp(with: styleName)
-        }
-    }
-    
-    
-    private func selectSyntaxPopUp(with styleName: String) {
+            self.selectSyntaxPopUpItem(with: styleName)
+        }
+    }
+    
+    
+    private func selectSyntaxPopUpItem(with styleName: String) {
         
         guard let popUpButton = self.syntaxPopUpButton else { return }
         

                popUpButton.bezelStyle = .texturedRounded
                popUpButton.menu?.autoenablesItems = false
                self.syntaxPopUpButton = popUpButton
                self.buildSyntaxPopupButton()
                
                let item = NSToolbarItem(itemIdentifier: itemIdentifier)
                item.label = "Syntax Style".localized

    
    
    /// Build syntax style popup menu in toolbar.
    private func buildSyntaxPopUpButton() {
        
        guard let menu = self.syntaxPopUpButton?.menu else { return }
        
