Gazebo Diary – Vol. 7 (Improvements in SDF Editor)

Binnur Görer · February 21, 2014

In order to add code folding property, I searched for more functional editor and encountered with Scintilla. Scintilla is an open source code editing component. It comes with complete code and you can enjoy with it as you like. You can install it also from package manager.

For the ones who want to embed this wonderful component into a QT project, QScintilla is also available.  QScintilla is a port to Qt the Scintilla editor. The SDF editor which is implemented by QScintilla is as follows;

schintilla1

It allows highlighting, code folding, line numbering which are needed for the SDF editor. As the SDF file gets larger, these properties will be vital.

Another point which is implemented in order to make our life easier is adding the “FIND” property. Scintilla provides some functions in order to find a word in the editor. It also provides find next function. I have created a find layout as follows for the find process. It is opened by clicking the find button, or simply by hitting the key combination (CTRL+F).

gazebo12 gazebo13

As seen, if the searched word exists in the code, the find layout turns into green, otherwise it is red. By using prev and next buttons, you can iterate over all matched words. Close button hides the find layout  as we have not large area to include it continuously.

Twitter, Facebook