<commit_before>DeferredAtomPackage = require 'deferred-atom-package'
LoadPathsTask = require './src/load-paths-task'

module.exports =
class FuzzyFinder extends DeferredAtomPackage
  loadEvents: [
    'fuzzy-finder:toggle-file-finder'
    'fuzzy-finder:toggle-buffer-finder'
    'fuzzy-finder:find-under-cursor'
  ]

  instanceClass: 'fuzzy-finder/src/fuzzy-finder-view'

  activate: (rootView) ->
    super

    if rootView.project.getPath()?
      callback = (paths) => @projectPaths = paths
      new LoadPathsTask(rootView, callback).start()

  onLoadEvent: (event, instance) ->
    if @projectPaths? and not @instance.projectPaths?
      @instance.projectPaths = @projectPaths
      @instance.reloadProjectPaths = false
<commit_msg>Use parameter instead of ivar<commit_after>DeferredAtomPackage = require 'deferred-atom-package'
LoadPathsTask = require './src/load-paths-task'

module.exports =
class FuzzyFinder extends DeferredAtomPackage
  loadEvents: [
    'fuzzy-finder:toggle-file-finder'
    'fuzzy-finder:toggle-buffer-finder'
    'fuzzy-finder:find-under-cursor'
  ]

  instanceClass: 'fuzzy-finder/src/fuzzy-finder-view'

  activate: (rootView) ->
    super

    if rootView.project.getPath()?
      callback = (paths) => @projectPaths = paths
      new LoadPathsTask(rootView, callback).start()

  onLoadEvent: (event, instance) ->
    if @projectPaths? and not instance.projectPaths?
      instance.projectPaths = @projectPaths
      instance.reloadProjectPaths = false

{'fraction_non_alphanumeric': 0.11634162743779422, 'fraction_numerical': 0.0, 'mean_word_length': 4.01010101010101, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6146162', 'n_tokens_mistral': 475, 'n_tokens_neox': 456, 'n_words': 86}