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?
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
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 Improve text editor by HelioGuilherme66 · Pull Request #2267 · robotframework/RIDE · GitHub 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.