def METHOD_NAME(self, formEditor):
    if self.initialized:
        return
    manager = formEditor.extensionManager()
    if manager:
        self.factory = \
            screenOptionsTaskMenuFactory(manager)
        manager.registerExtensions(
            self.factory,
            "org.qt-project.Qt.Designer.TaskMenu")
    self.initialized = True