Extending QtCreator's QML editor to detect properties using external databases
-
wrote on 22 Jul 2014, 11:46 last edited by
HI all,
AFAIk, the current editor in qtcreator uses the scanning of the source code to create a dictionary of objects-properties -methods of known things.
Using that dictionary it is able to show a completion popup suggesting possible properties and methods.
I would like to extend this source scanning method of populating the dictionary with a method (plugin) that manages a connection to an external database (of some kind). So the suggested completions do not come from source code but from this database.
So if one would type 'external.' external would not refer to an object in source code but to a built in plugin which provides access to said database of properties and methods.
I did check the QMLJsCompletionassist code but this does not show me how to create this special 'external' thing. AFAIK the ObjectValue refers to an object which has a method 'processMembers' (IIRC) which adds the possible completions to a list. I looks as if creating a special ObjectValue containing this special internal built-in object would be the most transparent solution. However I cannot find where this ObjectValue is created (i.e. where does typing in 'foo' lead to the objectvalue refering to the foo QObjectInstance) nor which methods should be implemented, from which Class I should preferrably inherit my special instance from.
Suggestions more than welcome
W
1/1