override method in protocol extension

I'm doing a Cocoa app with bindings and so in every single NSViewController I have to write this code:



   override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer<Void>) {
        guard context == &KVOContext else {
            super.observeValueForKeyPath(keyPath, ofObject: object, change: change, context: context)
            return
        }
        var oldValue = change?[NSKeyValueChangeOldKey]
        if oldValue is NSNull {
            oldValue = nil
        }
        guard let undoManager = undoManager, object = object, keyPath = keyPath else { return }
        undoManager.prepareWithInvocationTarget(object).setValue(oldValue, forKeyPath: keyPath)
    }


That's irritating. I wanted to fix it by creating an Undoable protocol, and then create a default implementation in an extension. But since this is an 'override' type method, that doesn't work. Short of creating an UndoableNSViewController that all my classes inherit from, are there other ways around this issue?

override method in protocol extension
 
 
Q