Having recently joined the Komodo team, I’ve been given the opportunity to write about my experience so far in contributing to Komodo and getting familiar with its code base.
My first task was creating an integrated, background spell checker for the upcoming Komodo IDE 9.2. This new checker is slated to replace the IDE’s existing and antiquated dialog-based one.
ko/editor module. The editor module provides a small, user-friendly subset of Scintilla’s capabilities: retrieving text, moving the caret, and performing simple actions like cut, copy, and paste. However, this subset was not enough for me — I needed access to Scintilla’s raw API in order to leverage my expertise. Then I found it:
This one line of code gave me unprecedented access to Scintilla’s raw power. From here on out it was a simple matter of determining what text is displayed in the window, which regions of text were eligible for spell checking, iterating over each word and invoking Mozilla’s built-in spell checking engine, and finally marking up misspelled words.
ko/dom modules to modify the default context menu on-the-fly to include spelling suggestions. I was able to employ the
ko/commands module to register a command for displaying said suggestions via key shortcut. I was able to use the
ko/logging module to help me find and explain the numerous bugs I experienced as I felt my way around the system.
All in all I learned a lot in developing this new feature for Komodo IDE. I will not say it was easy, nor can I say it was straightforward, but Komodo certainly has the proper foundation for a new developer like me to make a concrete contribution in a relatively short amount of time.