I have a long list of Code Templates in NetBeans and I want to sort them somehow because I don't remember all of them. The abbreviation for my code templates is: user_template, something like this:
alpha_sop wich does:
System.out.println(${cursor});
Also another one:
alpha_psvm
public static void main(String[] args) {
${cursor}
}
And many many more... Is there a way that after I write alpha_ and press ctrl+space a list of all available templates that contain alpha_ dropdown in a list? Id kinda like to select from my own list...
Something like:
alpha_ ctrl+space
*Dropdown*
alpha_psvm (with description of code)
alpha_sop (with description of code)
I'm currently using NetBeans 7.4 and it seems that CTRL + SPACE
Does in fact give me a list of suggestions for Code Templates.
I am not sure if CUSTOM templates get registered in the Code Assistance and seems there's been some bug reports already made.
Code Assistance in the NetBeans IDE Java Editor: A Reference Guide
This is the sollution for the templates to expand on code assistant (sorry but names are in spanish :P hope you get the idea)
It is impostant to chose CONTEXT where to apply those templates when pressing ctrl+space ...
And after adding a context you can properly expand:
It is important that the templates are structured properly with abbreviation and description...
This functionality (autocompletion with code templates) does not exist in Netbeans. However, you can customize the IDE to achieve this functionality. See autocompleteNB on GitHub.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.