valtech / aem-easy-content-upgrade

AEM Easy Content Upgrade simplifies content migrations in AEM projects
Other
61 stars 26 forks source link

Code completion in binding #55

Closed gruberrolandvaltech closed 4 years ago

gruberrolandvaltech commented 5 years ago

The Groovy Console already uses a JS library for syntax highlighting. This also supports code completion. We should use it for our aecu binding.

gruberrolandvaltech commented 5 years ago

The used lib is ACE: https://github.com/ajaxorg/ace https://ace.c9.io/

Vizz85 commented 5 years ago

useful links: https://gist.github.com/oskude/b760606d6842b498d018dc0bc27d3593

gruberrolandvaltech commented 5 years ago

Depends on https://github.com/icfnext/aem-groovy-console/pull/83

gruberrolandvaltech commented 5 years ago

Autocompletion examples:

https://gist.github.com/yuvalherziger/aa48782568c6914b55066d290ff88360 http://plnkr.co/edit/6MVntVmXYUbjR0DI82Cr?p=preview

gruberrolandvaltech commented 5 years ago

lang-tools is in /etc/clientlibs/groovyconsole/js/ext-language_tools.js

Idea: send auto-completion prefix (e.g. "aecu.contentUpgradeBuilder().for") to AEM via Ajax to get list of possible completions. AEM then checks via reflection which functions could be called.