

def open_file(self, selected_index):
    self.__class__.__is_active = False
    selected_entry = self.get_history_by_index(selected_index)
    if selected_entry:
        open_view = FileHistory().get_view_from_another_group(self.window, selected_entry['filename'])
        if (open_view and (not FileHistory().REOPEN_IN_CURRENT_GROUP)):
            FileHistory().debug(('Focussing existing view in group %d' % self.window.get_view_index(open_view)[0]))
            FileHistory().reset(selected_index.window)
            self.window.focus_view(open_view)
        else:
            FileHistory().open_history(self.window, selected_entry)
    else:
        FileHistory().reset(self.window)
        FileHistory().debug('User closed panel')
        if self.is_refresh_in_progress():
            self.window.run_command('open_recently_closed_file', {
                'current_project_only': self.current_project_only,
            })
            return
    self.history_list = {
        
    }

dataset/ETHPy150Open FichteFoll/FileHistory/file_history.py OpenRecentlyClosedFileCommand.open_file/VarMisuse@97/160 `self`->`selected_index`