Adds a new tab to the **Script_Editor_tabWidget** Widget and sets the given editor as child widget.

        :param editor: Editor.
        :type editor: Editor
        :return: New tab index.
        :rtype: int

def add_editor_tab(self, editor):
        """
        Adds a new tab to the **Script_Editor_tabWidget** Widget and sets the given editor as child widget.

        :param editor: Editor.
        :type editor: Editor
        :return: New tab index.
        :rtype: int
        """

        index = self.Script_Editor_tabWidget.addTab(editor, editor.get_file_short_name())
        LOGGER.debug("> Assigning '{0}' editor to '{1}' tab index.".format(editor, index))
        self.Script_Editor_tabWidget.setCurrentIndex(index)
        self.__set_tab_title(index)

        # Signals / Slots.
        editor.patterns_replaced.connect(self.__editor__patterns_replaced)
        editor.title_changed.connect(self.__editor__title_changed)
        editor.file_loaded.connect(self.__editor__file_loaded)
        editor.file_saved.connect(self.__editor__file_saved)
        editor.language_changed.connect(self.__editor__language_changed)
        editor.modification_changed.connect(self.__editor__modification_changed)
        editor.cursorPositionChanged.connect(
            self.Editor_Status_editorStatus._EditorStatus__editor__cursorPositionChanged)
        return index