Closes the editor file.

        :return: Method success.
        :rtype: bool

def close_file(self):
        """
        Closes the editor file.

        :return: Method success.
        :rtype: bool
        """

        if not self.is_modified():
            LOGGER.debug("> Closing '{0}' file.".format(self.__file))

            self.file_closed.emit()
            return True

        choice = message_box.message_box("Warning", "Warning",
                                         "'{0}' document has been modified!\nWould you like to save your changes?".format(
                                             self.get_file_short_name()),
                                         buttons=QMessageBox.Save | QMessageBox.Discard | QMessageBox.Cancel)
        if choice == QMessageBox.Save:
            if self.save_file():
                LOGGER.debug("> Closing '{0}' file.".format(self.__file))
                return True
        elif choice == QMessageBox.Discard:
            LOGGER.debug("> Discarding '{0}' file.".format(self.__file))

            self.file_closed.emit()
            return True
        else:
            return False