<commit_before>Picker = require '../ui/picker'

class GotoDeclaration
  constructor: (@analysisApi) ->

  displayProjectSymbols: =>
    atom.notifications.addInfo 'showing project symbols'
    editor = atom.workspace.getActiveTextEditor()
    path = editor.getPath()
    offset = 0
    length = editor.getText().length

    # @analysisApi.analysis.getNavigation path, offset, length
    @analysisApi.analysis.getLibraryDependencies().then (response) =>
      validFiles = []
      console.log 'RESULT:', response.result.packageMap
      for library in response.result.libraries
        validFiles.push(library)
      # for project, pkgs of response.result.packageMap
      #   console.log 'entering', project, 'it has', pkgs
      #   for pkg, files of pkgs
      #     for file in files
      #       validFiles.push(file) if atom.project.contains(file)
      #       # validFiles.push(file)

      @analysisApi.analysis.setSubscriptions { 'NAVIGATION': validFiles }

module.exports = GotoDeclaration<commit_msg>Fix minor linting nit.<commit_after>Picker = require '../ui/picker'

class GotoDeclaration
  constructor: (@analysisApi) ->

  displayProjectSymbols: =>
    atom.notifications.addInfo 'showing project symbols'
    editor = atom.workspace.getActiveTextEditor()
    path = editor.getPath()
    offset = 0
    length = editor.getText().length

    # @analysisApi.analysis.getNavigation path, offset, length
    @analysisApi.analysis.getLibraryDependencies().then (response) =>
      validFiles = []
      console.log 'RESULT:', response.result.packageMap
      for library in response.result.libraries
        validFiles.push(library)
      # for project, pkgs of response.result.packageMap
      #   console.log 'entering', project, 'it has', pkgs
      #   for pkg, files of pkgs
      #     for file in files
      #       validFiles.push(file) if atom.project.contains(file)
      #       # validFiles.push(file)

      @analysisApi.analysis.setSubscriptions {'NAVIGATION': validFiles}

module.exports = GotoDeclaration
{'fraction_non_alphanumeric': 0.10673880964092475, 'fraction_numerical': 0.000983767830791933, 'mean_word_length': 3.1765913757700206, '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': '6256003', 'n_tokens_mistral': 583, 'n_tokens_neox': 564, 'n_words': 130}