Hi,
I did not have much time to work on the KDevelop QML/JS language support last week because I had many big exams to study. Now, this is all done and I even received my results: all exams passed! Wonderful, I now have close to three months to dedicate entirely to KDE and KDevelop development.
Even if I wasn't able to implement much cool new things this week, I was able to fix several bugs. For instance, the unit tests are now more thorough and more stable (there were race conditions that made the tests fail on some computers and on the KDE build system). One interesting feature is the support for built-in QML types. These types are documented as part of the language and are not described in any QML module file. Examples of such types are rect
, font
, vector3d
and color
(note that their names start with a lower-case letter).
There are still missing types, because some of them are not part of any module and not documented anywhere else. They have to be discovered. For instance, QQuickAnchorLine doesn't exist anywhere, so anchors.verticalCenter
is shown to have type <class>. I'll have to look in the C++ documentation of these classes and to build the corresponding QML types myself in order to have them working. It should not be too complicated.
Today was my first "holiday" day, so I was able to fix a bit more bugs. Nothing fancy here, but syntax-highlighting now works a bit better if you change something in a document and make it unparsable. Code-completion is also disabled in comments, and Javascript (and QML) functions are now completed with braces (if you select "doSomething" in a code-completion list, "doSomething()" is inserted in the document and your cursor is put inside the braces). Last but not least, there is code-completion for import statements (module names and versions are displayed):
I'm not yet happy with the result and I think it would be preferable to first show the module names (in alphabetical order, and without any duplicate). Then, when the user has selected a module, display its available versions. I think that this is how QtCreator handles the thing.
The coming days will be dedicated to more bug fixes, and to proper handling of "property widgets" (tool-tips that are displayed for select QML properties and that allow you to visually choose a value for them, for instance a color chooser). All in all, QML supports should start to be somewhat usable, and I will try to edit big QML projects in KDevelop. After that, I will be able to work on Javascript support. For instance, function call-tips are a wonderful feature that is currently not supported (this feature displays the name and types of the parameters of the function you are calling, so that you can see what you are doing). Javascript objects, classes and prototypes are the next big chunk, that may well take most of the second half of the GSoC. It's also the most challenging and interesting part of the GSoC, and I'm eager to start working on that!