@@ -137,7 +137,7 @@ def _get_default_keywords(self):
137137 def get_suggestions_for (self , controller , start ):
138138 datafile = controller .datafile
139139 ctx = self ._context_factory .ctx_for_controller (controller )
140- sugs = self ._words_cache or set ()
140+ sugs = set () # self._words_cache or
141141 print (f"DEBUG: namespace.py Namespace get_suggestions_for ENTER start={ start } { datafile = } { ctx = } { sugs = } " )
142142 while start and start [- 1 ] in [']' , '}' , '=' , ',' ]:
143143 start = start [:- 1 ]
@@ -152,6 +152,7 @@ def get_suggestions_for(self, controller, start):
152152 sugs .update (self ._content_suggestions (f'{ v } { start } ' ))
153153 else :
154154 sugs .update (self ._content_suggestions (start ))
155+ print (f"DEBUG: namespace.py Namespace get_suggestions_for FROM CONTENT start={ start } { sugs = } " )
155156 sugs_list = list (sugs )
156157 sugs_list .sort ()
157158 print (f"DEBUG: namespace.py Namespace get_suggestions_for RETURN { sugs_list = } " )
@@ -186,12 +187,18 @@ def _variable_suggestions(self, controller, start, ctx):
186187 def _content_suggestions (self , start ):
187188 sugs = set ()
188189 for v in self ._words_cache :
189- if isinstance (v , (TestCaseUserKeywordInfo , ResourceUserKeywordInfo , VariableInfo , UserKeywordInfo ,
190- ArgumentInfo , LibraryKeywordInfo , BlockKeywordInfo )):
190+ if isinstance (v , (TestCaseUserKeywordInfo , ResourceUserKeywordInfo , UserKeywordInfo ,
191+ LibraryKeywordInfo , BlockKeywordInfo )):
191192 if v .name .lower ().startswith (start .lower ()):
192193 sugs .update (v .name )
193- elif (v .lower ().startswith (start .lower ()) or v .strip ('$&@%{[(' ).lower ()
194- .startswith (start .strip ('$&@%{[(' ).lower ())):
194+ elif isinstance (v , (VariableInfo , ArgumentInfo )):
195+ if v .name_matches (start ):
196+ print (f"DEBUG: namespace.py Namespace _content_suggestions SUGGESTION from VARIABLE { v .name = } " )
197+ sugs .update (v .name )
198+ elif (v .lower ().startswith (start .lower ()) or v .strip ('$&@%{[()]}=' ).lower ()
199+ .startswith (start .strip ('$&@%{[()]}=' ).lower ())):
200+ print (f"DEBUG: namespace.py Namespace _content_suggestions SUGGESTION from STRING { v = } "
201+ f"\n v.lower().startswith(start.lower() ={ v .lower ().startswith (start .lower ())} " )
195202 sugs .update (v )
196203 return sugs
197204
0 commit comments