How to update comment block in front of methods in Netbeans?
I know this is not programming related question so to speak, 开发者_如何转开发but since we are programmers and we might use Netbeans for PHP development.
I am wondering how can I get in Netbeans to update the comment block in front of a method, after I change the parameter set. I need to update it someway automatically, and to keep what I've been added there before.
Suppose I added 10 more parameters to the method, and I want that to appear in the comment section before(PHPdoc), how do I update the comment section?
In NetBeans 6.9.1 you can type.
/** /
Then press enter and it will generate comments with parameters for you.
You could try to add a new line after the last existing parameter definition and hit your auto-complete keys (usually ctrl-space). Eg:
/**
* @var blah<new line here>
*/
And then
/**
* @var blah
* <ctrl-space>
*/
It might fill it in for you...
If I read that right, you're hoping for some magic that will adjust your existing docblock whenever you edit the actual method signature in the code. I'd be very surprised if any IDE can do this.
I know that Eclipse can automatically populate a new docblock that you begin to write in front of the already coded method, showing @param tags automatically, but that's the extent of it. For an IDE to modify a docblock on the fly as you edit the code, ... that would get very complex, I'd think.
I really think you'll have to hand-edit your docblock, adding new @param tags to fit however you've modified your method.
精彩评论