Esempio 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, "")
Esempio 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, "")
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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, "")