def report_changed(self, project_path, file_path): """ Reports the change of the contents of file_path. :param project_path: the actual project path :param file_path: the file path """ if project_path != NO_ROOT_PATH: project, file_path = self.project_for(project_path, file_path) libutils.report_change(project, file_path, "")
def report_changes(_, project, path, old_content): try: try: libutils.report_change(project, path, old_content) except AttributeError: _logger().warn('failed to report change for file %r, file outside ' 'of the project root dir?', path) except RopeError as e: error = RefactoringError() error.exc = str(e) error.traceback = traceback.format_exc() error.critical = False return error except Exception as e: error = RefactoringError() error.exc = str(e) error.traceback = traceback.format_exc() error.critical = True return error
def report_changes(_, project, path, old_content): try: try: libutils.report_change(project, path, old_content) except AttributeError: _logger().warn( 'failed to report change for file %r, file outside ' 'of the project root dir?', path) except RopeError as e: error = RefactoringError() error.exc = str(e) error.traceback = traceback.format_exc() error.critical = False return error except Exception as e: error = RefactoringError() error.exc = str(e) error.traceback = traceback.format_exc() error.critical = True return error
def after_save_actions(self): if self.project is not None and self.old_content is not None: libutils.report_change(self.project, self.env.filename(), self.old_content) self.old_content = None
def report_changed(self, project_path, file_path): if project_path != NO_ROOT_PATH: project = self.project_for(project_path, file_path) libutils.report_change(project, file_path, "")