Get a folder with snippets recursively from the toolbox

For example, I have a folder and there are some other folders with snippets in them. How I can get the tree of the folder? Like:

folder
- html
-- snippet [in the format of ko.abbrev.findAbbrevSnippet]
- css
-- snippet [in the format of ko.abbrev.findAbbrevSnippet]
-- snippet [in the format of ko.abbrev.findAbbrevSnippet]

(maybe in json format)

var tbSvc = Cc["@activestate.com/koToolbox2Service;1"].getService(Ci.koIToolbox2Service);
tbSvc.findToolsAsync("Compile", 0, [], function(nr, results) { console.log(results[0].name); })

For reference:

https://github.com/Komodo/KomodoIDE/blob/master/src/modules/scope_tools/content/tools.js#L39

1 Like