jcberquist / sublimetext-cfml

CFML (ColdFusion and Lucee) package for Sublime Text
MIT License
115 stars 24 forks source link

Doc block preventing completions from firing #31

Closed sethstone closed 8 years ago

sethstone commented 8 years ago

I'm not sure if this is related to the recent commit, but completions fail whenever a component contains a valid docblock

Completions fail:

/**
  * @description My constructor
  */
public any function init() {
}

Completions work:

/*
  * @description My constructor
  */
public any function init() {
}

Here's the error I'm getting in ST3 build 3114, CFML plugin 0.12.1

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 377, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "cfml_plugin in C:\Users\user\AppData\Roaming\Sublime Text 3\Installed Packages\CFML.sublime-package", line 61, in on_query_completions
  File "src.completions in C:\Users\user\AppData\Roaming\Sublime Text 3\Installed Packages\CFML.sublime-package", line 57, in get_script_completions
  File "src.completions in C:\Users\user\AppData\Roaming\Sublime Text 3\Installed Packages\CFML.sublime-package", line 15, in get_completions
  File "src.in_file_completions.in_file_completions in C:\Users\user\AppData\Roaming\Sublime Text 3\Installed Packages\CFML.sublime-package", line 7, in get_script_completions
  File "src.in_file_completions.metadata in C:\Users\user\AppData\Roaming\Sublime Text 3\Installed Packages\CFML.sublime-package", line 7, in get_view_metadata
  File "src.model_index.cfc_index.cfml_components in C:\Users\user\AppData\Roaming\Sublime Text 3\Installed Packages\CFML.sublime-package", line 117, in parse_cfc_file_string
  File "src.model_index.cfc_index.cfml_functions in C:\Users\user\AppData\Roaming\Sublime Text 3\Installed Packages\CFML.sublime-package", line 34, in index
  File "src.model_index.cfc_index.cfml_functions in C:\Users\user\AppData\Roaming\Sublime Text 3\Installed Packages\CFML.sublime-package", line 44, in find_script_functions
  File "src.model_index.cfc_index.cfml_functions in C:\Users\user\AppData\Roaming\Sublime Text 3\Installed Packages\CFML.sublime-package", line 76, in parse_script_function
AttributeError: 'list' object has no attribute 'subkey'
jcberquist commented 8 years ago

Thanks for the detailed error message. Based on the line numbers in the stack, it looks to me like perhaps you haven't reloaded sublime text after the version update to 0.12.1?

sethstone commented 8 years ago

So sorry, I had noticed the issue happening and then closed and reopened sublime and saw the update and it was still happening. I missed closing and reopening a second time. I think it's working now.

jcberquist commented 8 years ago

No worries. Sublime Text reloads .py files in the main directory of plugins whenever they change, but .py files in sub-directories are only loaded when ST starts. This catches me all the time.