How to place cursor in NetBeans Java file templates?

点点圈 提交于 2020-01-03 16:55:34

问题


I would like to have the cursor in the JavaDoc area when creating interfaces, classes, etc. in NetBeans. You can use ${cursor} for non-file-based templates, but this doesn't work for file templates.

<#if package?? && package != "">
package ${package};

</#if>
/**
 * ${cursor}     <-- Inserts a message that "cursor" is an unknown variable. :(
 *
 * @author ${user}
 */
public class ${name}
{

}

Is there a similar mechanism for file templates?


回答1:


For some reason this feature hasn't been implemented (yet). See this issue for details.



来源:https://stackoverflow.com/questions/10128996/how-to-place-cursor-in-netbeans-java-file-templates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!