Closed geekdenz closed 8 years ago
I didn't know about that feature - that's pretty neat. If you already know how to implement it, a PR would be welcome.
You can assign it to me if you like. I will try to get it done now and make a pull request.
Implemented by https://github.com/Everlaw/nbts/pull/10
Code templates works like a charm, the problem is, that they are not shown inside the code completion. This is a pain in the ass, because I wanted to create code templates like ng2-component like the one for VS Code and I have to type the whole thing and hit tab, because the code completion will not include typescript code templates. Should I create a new ticket for this?
I created a ticket for the missing code templates in the JS code completion: https://netbeans.org/bugzilla/show_bug.cgi?id=259167 and Petr Pisl fixed that with this: http://hg.netbeans.org/web-main/rev/12efdfd69406. So there you can find how he did this.
Code Templates may be a good addition to your projects and should be near trivial to implement. I would be happy to do that. At the moment the code templates are just copied from JavaScript, but I could "typify" them. I added one for arrow functions or anonymous functions like so already in our project: