Exemplo n.º 1
0
    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, "")
Exemplo n.º 2
0
    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, "")
Exemplo n.º 3
0
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
Exemplo n.º 4
0
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
Exemplo n.º 5
0
 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
Exemplo n.º 6
0
 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
Exemplo n.º 7
0
 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, "")