def save_file_data(self, path):
        """ Implements the abstract method of the ExternalEditor class.
        """
        sm = self.model.state.get_state_machine()
        if sm.marked_dirty and not self.saved_initial:
            try:
                # Save the file before opening it to update the applied changes. Use option create_full_path=True
                # to assure that temporary state_machines' script files are saved to
                # (their path doesnt exist when not saved)
                filesystem.write_file(os.path.join(path, storage.SCRIPT_FILE),
                                      self.view.get_text(), create_full_path=True)
            except IOError as e:
                # Only happens if the file doesnt exist yet and would be written to the temp folder.
                # The method write_file doesnt create the path
                logger.error('The operating system raised an error: {}'.format(e))
            self.saved_initial = True
def save_file_data ( self , path ) : sm = self . model . state . get_state_machine ( ) if sm . marked_dirty and not self . saved_initial : try : filesystem . write_file ( os . path . join ( path , storage . SCRIPT_FILE ) , self . view . get_text ( ) , create_full_path = True ) except IOError as e : logger . error ( 'The operating system raised an error: {}' . format ( e ) ) self . saved_initial = True
Implements the abstract method of the ExternalEditor class.