예제 #1
0
 def _load_recent(self):
     """Load recent files from main container"""
     if self._recent_files:
         return
     main_container = IDE.get_service("main_container")
     for nfile in main_container.last_opened_files:
         item = locator.ResultItem("+", nfile.display_name, nfile.file_path)
         self._recent_files.append(item)
 def _filter_tabs(self, filterOptions, index):
     at_start = (index == 0)
     if at_start:
         ninjaide = IDE.getInstance()
         opened = ninjaide.filesystem.get_files()
         self.tempLocations = [
             locator.ResultItem(
                 locator.FILTERS['files'],
                 opened[f].file_name, opened[f].file_path) for f in opened]
         search = filterOptions[index + 1].lstrip().lower()
         self.tempLocations = [
             x for x in self.tempLocations
             if x.comparison.lower().find(search) > -1]
         index += 2
     else:
         del filterOptions[index + 1]
         del filterOptions[index]
     return index