def run(self): view = self.view self.patterns.reset() Settings.reset() AutocompleteList.clear() prev_word = SelectedRegion(view).get_previous_word() if (Constants.SELF_WORD == prev_word): class_names = self.find_class_names() else: class_names = [prev_word] if (len(class_names) > 0): for class_name in class_names: self.patterns.init_autocomplete_patterns(class_name) file_search_manager.check_project_folders(self.find_methods_in_line) Settings.get_word_param().enable(False) Settings.get_explicit_param().enable(False) Settings.get_autocomplete_param().enable(True) view.run_command("auto_complete") else: print "[G2f] could not find function definition"
def run(self): view = self.view self.patterns.reset() Settings.reset() AutocompleteList.clear() prev_word = SelectedRegion(view).get_previous_word() if (Constants.SELF_WORD == prev_word): class_names = self.find_class_names() else: class_names = [prev_word] if (len(class_names) > 0): for class_name in class_names: self.patterns.init_autocomplete_patterns(class_name) file_search_manager.check_project_folders( self.find_methods_in_line) Settings.get_word_param().enable(False) Settings.get_explicit_param().enable(False) Settings.get_autocomplete_param().enable(True) view.run_command("auto_complete") else: print "[G2f] could not find function definition"
def do_search(self): prev_word = SelectedRegion(self.view).get_previous_word() if (Constants.SELF_WORD != prev_word): self.patterns.init_table_patterns(prev_word) self.check_project_folders(self.check_pattern_in_lines) Settings.get_word_param().enable(False) Settings.get_explicit_param().enable(False) Settings.get_autocomplete_param().enable(True) self.view.run_command("auto_complete") else: print "[G2f] Could not find function definition"
def on_query_completions(self, view, prefix, locations): Settings.reset() enabled = Settings.get_word_param().is_enabled() and (0 != len(prefix)) word_completions = 0 if enabled else sublime.INHIBIT_WORD_COMPLETIONS enabled = Settings.get_explicit_param().is_enabled() explicit_completions = 0 if enabled else sublime.INHIBIT_EXPLICIT_COMPLETIONS Settings.get_autocomplete_param().enable(False) return (AutocompleteList.get(), word_completions | explicit_completions)