We've just added code completion for PHPDoc tags. It pops up automatically when the user types '@' inside a PHPDoc comment. There are many areas to improve, in the future we are going to be more intelligent about the parameters for the commonly used tasks.
One neat feature that it already implemented is showing tag documentation including example of use:
wow great, thanks...
wanna ask, is it this improvement will be in PHP plugin update or will available in future version (nb 6.5)
thanks
This is a part of 6.5 build. You can download the php ide as result of continual build of trunk at http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/. There you can also download all in one version.
hey sounds great,
can I have code completion for method calls, pls?
( $object -> getValue() )
Code completion for method works in some cases. The file has to be in a project and the file with the class has to be included or required in the edited file. We are working to work without these conditions. Correct me Tomasz, if I'm wrong.
Ahh, thank you!
I have found out why it won't work in my project:
Server variables are not translated into paths., document root points to /var/www/
define("_SYSPATH",$_SERVER['DOCUMENT_ROOT']."system/");
include(_SYSPATH.'core/entity/Object.class.php');
$entity = new Object();
$entity-> no code completion here,
It works only with absolute paths, or relative paths...
Hi,
Great work on the project! I am currently using Zend Studio and this looks loads better already!
I had a question about phpDocs. Will you be able to auto generate them for say a function or variable. I really like this function in Zend Studio. You can just select a funtion and click a button and the phpDoc block with @var('s) is created for you above the function.
I am reluctantly starting to get in the habit of commenting my work so any shortcuts are good.
Regards,
Kevin
Hi Kevin,
in NetBeans there is not exactly the same functionality as you described. But there is something similar.
Just write "/\*\*" and press enter on a line before a function, class or field decalration. NetBeans will automatically generate stab of the PHPDoc for you.
For example on line 11 function declaration starts:
public function setNick($nick) {
...
When you write at line 10 /\*\* and press enter, then NetBeans generates
/\*\*
\*
\* @param <type> $nick
\*/
public function setNick($nick)
Does it fits what you need? Thanks,
Petr
Thanks Petr,
That is exactly what I was looking for!
-Kevin
Hi sorry this is very late to the post, but how can i add some new @tagname to include by default when using the /\*\* above the function as per Petr's Post.
Just started using Netbeans and this is exactly what I'm looking for. I've been manually commenting my work for a while.
Thanks
I using netbeans 6.8 and for me auto completion don't work. If i write "/\*\*" before my function etc and press Enter i get
"/\*\*
\*
\*/"
How to fix it ?
My auto completion stopped working, too. If you type "/\*\*" before a coded class you get an empty: "/\*\*
\*
\*/"
When you type "/\*\*" before interfaces or functions you will get an open comment:
"/\*\*
\*"
This worked in Netbeans 6.7 Is this a degression through a recent update?
The PHP Doc hints/tool tips from older entries still work...
Just type / * * (without the spaces)
(You do not need to escape the * anymore)