Lexical/autocomplete feature of ride?

I need to extend the lexical/autocomplete feature of ride. I have downloaded https://github.com/robotframework/RIDE. I am trying to debug it but to no avail. I put print statement in several file like robotide/editor/texteditor.py OnContentAssist method but it is not printing, however after running ride.py I have used ctrl - space to use this autocomplete facility.

Could you please shed light on how to debug the RIDE code?

Thanks.

Usually we see the print output in the Run log panel of PyCharm CE.
For programming that is a good IDE.

Can you give details of what you want to achieve?

For development tasks is better to communicate on the GitHub project, like you referenced.

Thank you Helio. I want this autocomplete feature integrated with my django web application, so that using flow chart I can write robot script.

I am using visual studio code to run ride.py but print statements are not appearing in terminal. attached screenshot for same.

I am a bit lost on the context.

Are using or planning to use RIDE’s python code in a Django application?

Do you use RIDE to write test suites, and you miss Django autocomplete lexical content?

Usually when we run development version of RIDE (outside of PyCharm CE), we use:
invoke devel

In other cases, you need to be sure that you are running the development version, by setting PYTHONPATH to the project src like:
set PYTHONPATH=D:/azure/RIDE-master/RIDE-master/src
And run like:
python D:/azure/RIDE-master/RIDE-master/src/robotide/__init__.py

Again please clarify your intentions, because I am sure that there are better solutions than using RIDE code.

Yes I am planning to use Ride’s python code in django application. More specifically the autocompletion/lexical feature I need in the django application.

I am not sure if this is good approach, please suggest. That’s why I am trying to debug RIDE’s code to understand this autocomplete feature.

My intention is to add this lexical/autocomplete feature in my django application where I am creating workflow using flowchart and want to add this autocomplete feature to robot script commands in the workflow.

Yes I am planning to use Ride’s python code in django application.
In that case, I bow to you brave code warrior. Welcome to the adventure :smiley:

RIDE obtains keywords docs from imported libraries, and builtin using module namespace, then stores it in a SQL-lite database which works as cache. When invoked does a similarity query and creates a list.
Only recently I have fixed this on https://github.com/robotframework/RIDE/pull/2267 because was not working for Resource files. The relevant code change is at src/robotide/namespace/suggesters.py.

You need to understand a bit of RIDE history. This autocomplete was originally created for the Grid or Cell Editor, only later was adapted for the Text Editor.

I think you would better start your own implementation, with cleaned up code. Most of the text editors, like for example, Notepad++, Geany, use the Scintilla library. RIDE does this too, by using wx.stc. That would be a better place to start. Run the demo, or even the CustomCodeEditor (right click a file on RIDE’s File explorer), you can see there the Demo autocomplete with Ctrl-Space.

Other option which is getting good interest from our community, is the Language Server Protocol https://github.com/robocorp/robotframework-lsp.

Good luck.