If i want to implement foll开发者_运维知识库owing comment in shorts-cut, what should i do ?
I found shift+alt+j only comment before method body, i just want to comment in method.
thanks in advance
/**
** @modify by grandstream
** @oginal functions 将原先的代码注释 在这部分
** @desc 说明修改的原因
** start modify
*/
xxxxxxxxxx 新的代码
xxxxxxxxx
/**
** end modify
*/
You can define a template (Window>Preferences>Java>Editor>Templates). Insert your comments there, you can use ${line_selection} as a placeholder for the lines that are selected when you use the template.
Such templates are then "Surround with"-Templates, the shortcut for a list of them ist Shift + Alt + Z. So select your code xxxxx, press the Shift + Alt + Z and select your new template to insert the comments.
精彩评论