This project is read-only.

Services.LanguageService.getCompletionsAtPosition parameter isMemberCompletion

Topics: General
Jun 26, 2013 at 3:42 PM
I was digging through the source of isMemberCompletion in the language services and I noticed something a little bit confusing. isMemberCompletion appears to be a field that you specify when you call the function. However, it appears to me that in every logical branch of the function, isMemberCompletion gets modified by the method before its ever called upon, thus rendering the parameter redundant. I know this can't be and I was wondering if someone could help me figure out in what scenarios it's used and what it does exactly. Thanks!
Jun 26, 2013 at 11:56 PM
That is correct. The parameter is not being used currently. The API has undergone a series of changes over the last two releases, and still needs some cleanup. The parameter was used before when the API assumed the host will do part of the detection of the location of the completion request. This has since changed. The getCompletions method now uses the SyntaxTree to detect its location. I will be removing this parameter in a general clean up for the API before 0.9.1 is released. Thanks for bringing this up and sorry for the confusion.