Skip to content

Commit 6f0d8ee

Browse files
Improve autocomplete lists
1 parent 49fdf1b commit 6f0d8ee

File tree

9 files changed

+17
-16
lines changed

9 files changed

+17
-16
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioni
1414
- Added on Text Editor, folding margin with markers style configurable with ``fold symbols`` in settings.cfg.
1515

1616
=== Changed
17+
- Improved autocompletion lists, by using existing words in Test Suite file (still needs more improvements).
1718
- Create directories when needed in New Project dialog.
1819
- Improved the recognition of BDD/Gherkin prefixes when localized in autocomplete on Grid Editor.
1920
- Improved colorization for multiple Gherkin words, for example in the French language.

src/robotide/application/CHANGELOG.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
</li><li class="listitem">
88
Added on Text Editor, folding margin with markers style configurable with ``fold symbols`` in settings.cfg.
99
</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="_changed"></a>1.2. Changed</h3></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
10+
Improved autocompletion lists, by using existing words in Test Suite file (still needs more improvements).
11+
</li><li class="listitem">
1012
Create directories when needed in New Project dialog.
1113
</li><li class="listitem">
1214
Improved the recognition of BDD/Gherkin prefixes when localized in autocomplete on Grid Editor.

src/robotide/application/releasenotes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ def set_content(self, html_win, content):
168168
</ul>
169169
<p><strong>New Features and Fixes Highlights</strong></p>
170170
<ul class="simple">
171+
<li>Improved autocompletion lists, by using existing words in Test Suite file (still needs more improvements).</li>
171172
<li>Fixed not set text color on row labels in Grid Editor. Now the General <b>secondary foreground</b> is applied.</li>
172173
<li>Added on Text Editor, tab indentation markers and <b>tab markers</b> boolean setting with default <b>True</b>.</li>
173174
<li>Added on Text Editor, folding margin with markers style configurable with <b>fold symbols</b> in settings.cfg.</li>
@@ -232,7 +233,7 @@ def set_content(self, html_win, content):
232233
<pre class="literal-block">python -m robotide.postinstall -install</pre>
233234
<p>or</p>
234235
<pre class="literal-block">ride_postinstall.py -install</pre>
235-
<p>RIDE {VERSION} was released on 22/February/2025.</p>
236+
<p>RIDE {VERSION} was released on 17/March/2025.</p>
236237
<!-- <br/>
237238
<h3>May The Fourth Be With You!</h3>
238239
<h3>Celebrate the bank holiday, 10th June, Day of Portugal, Portuguese Communities and Camões!!</h3>

src/robotide/editor/contentassist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ def content_assist_for(self, value, row=None):
547547
self._parent.hide()
548548
return False
549549
self._choices = list(set([c for c in self._choices if c is not None]))
550-
print(f"DEBUG: contentassist.py ContentAssistPopup content_assist_for CALL POPULATE Choices={self._choices}")
550+
# print(f"DEBUG: contentassist.py ContentAssistPopup content_assist_for CALL POPULATE Choices={self._choices}")
551551
self._list.populate(self._choices)
552552
return True
553553

src/robotide/editor/texteditor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ def collect_words(self, text: str):
12061206
if wl and wl[0].isalpha():
12071207
words.add(w)
12081208

1209-
print(f"DEBUG: texteditor.py SourceEditor collect_words returning {words=}")
1209+
# print(f"DEBUG: texteditor.py SourceEditor collect_words returning {words=}")
12101210
return sorted(words)
12111211

12121212
def on_content_assist(self, event):
@@ -2570,7 +2570,7 @@ def on_key_pressed(self, event):
25702570
self.parent.on_content_assist(event)
25712571
self.key_trigger = 0
25722572
else:
2573-
print(f"DEBUG: texteditor.py RobotDataEditor on_key_pressed calling try_autocomplete key={key}")
2573+
# print(f"DEBUG: texteditor.py RobotDataEditor on_key_pressed calling try_autocomplete key={key}")
25742574
self._try_autocomplete(key, event)
25752575
event.Skip()
25762576

src/robotide/namespace/local_namespace.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(self, controller, namespace):
3030
self.namespace = namespace
3131

3232
def get_suggestions(self, start):
33-
print(f"DEBUG: local_namespace.py LocalMacroNamespace get_suggestions ENTER start={start}")
33+
# print(f"DEBUG: local_namespace.py LocalMacroNamespace get_suggestions ENTER start={start}")
3434
return self.namespace.get_suggestions_for(self._controller, start)
3535

3636
def has_name(self, value):
@@ -56,8 +56,8 @@ def __init__(self, controller, namespace, row):
5656

5757
def get_suggestions(self, start):
5858
suggestions = LocalMacroNamespace.get_suggestions(self, start)
59-
print(f"DEBUG: suggesters.py LocalRowNamespace get_suggestions after LocalMacroNamespace start={start}\n"
60-
f"suggestions={suggestions}")
59+
# print(f"DEBUG: suggesters.py LocalRowNamespace get_suggestions after LocalMacroNamespace start={start}\n"
60+
# f"suggestions={suggestions}")
6161
if self._could_be_variable(start):
6262
suggestions = self._harvest_local_variables(start, suggestions)
6363
else:

src/robotide/namespace/suggesters.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, plugin, controller):
2525
self._controller = controller
2626

2727
def get_suggestions(self, value, row=None):
28-
print(f"DEBUG: suggesters.py SuggestionSource get_suggestions ENTER value={value}")
28+
# print(f"DEBUG: suggesters.py SuggestionSource get_suggestions ENTER value={value}")
2929
start = value
3030
while start and start[-1] in [']', '}', '=', ',']:
3131
start = start[:-1]
@@ -46,7 +46,7 @@ def get_suggestions(self, value, row=None):
4646
# return list(sugs)
4747
if self._plugin:
4848
sugs.update(self._plugin.content_assist_values(initial)) # DEBUG: Remove old functionality when no more needed
49-
print(f"DEBUG: suggesters.py SuggestionSource get_suggestions IN LOOP initial ={initial} len sugs={len(sugs)}")
49+
# print(f"DEBUG: suggesters.py SuggestionSource get_suggestions IN LOOP initial ={initial} len sugs={len(sugs)}")
5050
return list(sugs)
5151

5252
def update_from_local(self, words: list, language:str):
@@ -61,8 +61,8 @@ def update_from_local(self, words: list, language:str):
6161
list(localized.bdd_prefixes) + localized.true_strings + localized.false_strings))
6262
namespace = self._controller.get_local_namespace()
6363
namespace.update_words_cache(words)
64-
print(f"DEBUG: suggesters.py SuggestionSource update_from_local words={words} namespace={namespace} "
65-
f"language={localized.name}")
64+
# print(f"DEBUG: suggesters.py SuggestionSource update_from_local words={words} namespace={namespace} "
65+
# f"language={localized.name}")
6666

6767
@total_ordering
6868
class _Suggester(object):
@@ -135,7 +135,7 @@ class BuiltInLibrariesSuggester(_Suggester):
135135

136136
def get_suggestions(self, name, *args):
137137
_ = args
138-
print(f"DEBUG: suggesters.py BuiltInLibrariesSuggester get_suggestions ENTER name={name}")
138+
# print(f"DEBUG: suggesters.py BuiltInLibrariesSuggester get_suggestions ENTER name={name}")
139139
return [self._suggestion(n) for n in sorted(robotapi.STDLIB_NAMES)
140140
if name.lower() in n.lower() and n not in ['BuiltIn', 'Reserved', 'Easter']]
141141

src/robotide/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
#
1616
# Automatically generated by `tasks.py`.
1717

18-
VERSION = 'v2.2dev11'
18+
VERSION = 'v2.2dev12'

utest/editor/test_texteditor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import pytest
2020
import unittest
2121
import wx
22-
from duckduckgo_search.cli import suggestions
2322
from wx.lib.agw.aui import AuiManager
2423
import wx.lib.agw.aui as aui
2524
from multiprocessing import shared_memory
@@ -36,8 +35,6 @@
3635
ResourceFileController)
3736
from robotide import utils
3837
from utest.resources import FakeSettings, FakeEditor
39-
# from robotide.ui import treeplugin as st
40-
# from robotide.ui import treenodehandlers as th
4138
from robotide.publish import PUBLISHER, RideSuiteAdded, RideNotebookTabChanging
4239
from robotide.ui.treeplugin import Tree
4340
from robotide.ui.notebook import NoteBook

0 commit comments

Comments
 (0)