I tried to use the new API for live templates, but I can't get it to work.
Here's what I tried:
Plugin name here
short description of the plugin
When I run a plugin run configuration I see the macro in the list ("some description"), but when used, it expands to the empty string.
What did I do wrong, and how can I get it to expand to something? A hardcoded string is fine for start.
Is it possible to register an extension at runtime, something like ExtensionsRegistry.registerNewExtension("com.intellij.liveTemplateMacro", net.mycompany.stuff.MyMacro.class) ?
And now a question regarding a painfull issue. Javadocs.
I understand the OpenAPI has grown large and would take a long time to document it all, but can you, please, add javadocs for new stuff?
Basic info to get someone started wouldn't take a lot of time (for new APIs) and would be great.
Missing javadocs is especially a problem in closed-source applications, because I can't find out what's expected from an interface without reading the code using it, which I can't.
By the way, liveTemplateMacro is unrecognized in plugin.xml. Probably the resources.jar!/META-INF/plugin.xml needs to be updated.
EDIT: forgot to add: during expansion (press Tab), none of the methods in MyMacro are being called which seems a little strange to me - verified with the debugger.
The only method that is being called is getDescription() and that's only when I open the Live Templates configuration dialog.