This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 185567 - Support PHPDoc docblock templates in code completion/hints
Summary: Support PHPDoc docblock templates in code completion/hints
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal with 5 votes (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-05 21:41 UTC by mjh_ca
Modified: 2016-09-23 10:39 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mjh_ca 2010-05-05 21:41:57 UTC
Please add support for PHPDoc docblock templates.

Netbeans 6.9 beta does not appear to support PHPDoc docblock templates (see docs:
http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate).  

For example:

---

class Foo {

    /**#@+
     * Some description here
     * @var string
     */
    protected $foo;
    protected $bar;
    /**#@-*/
}

---

As expected, typing $this->foo within the class shows the "Some description here" and string type hint.  However, (unexpected) it also shows the #@+ characters.  And, typing $this->bar shows "PHPDoc not found" as opposed to showing the 'inherited' docblock.

It simply appears that this functionality is not yet supported as of 6.9 beta (Netbeans 6.9 Beta build 201004200117).  Would be great if this could be added.
Comment 1 daniela.waranie 2010-08-23 13:44:39 UTC
In NetBeans 6.9.1 there is still no docblock support for PHPUnit docblock annotations (e.g. @depends, @dataProvider, etc) in auto-completion.

With my post I want to show that the community would cherish this feature. (Hope this makes a netbeans developer take this ticket.)

For me it would be a "time saver".
Comment 2 leipie 2012-11-29 10:37:10 UTC
In 7.1.2 on linux there still seems to be no support for these docblock templates.

I would really like to use this, because my colleges use phpstorm and it does support it. Also it saves me a lot of duplicate annotions (for enum emulation with consts in a class).
Comment 3 vick 2013-06-05 19:25:06 UTC
This capability doesn't seem to be available in Netbeans 7.3.
Comment 4 promiseofcake 2013-08-15 21:45:01 UTC
In 7.3 Code completion works if you use a "pseudo-docblock".

https://netbeans.org/kb/docs/php/editorguide.html#vartyp-cmnt

Ex:

/* @var $result mysqli_result */

as opposed to the PHPDoc standards of:

/**
 * @var $result mysqli_result
 */

Which fails to be parsed correctly.

It would be nice if the end user had the flexibility to do both.
Comment 5 hoppithek 2016-08-03 15:34:50 UTC
In 8.1 docblock templates seam to break the php parser. Files containing docblock templates are not available for code completion / code navigation.
Comment 6 hoppithek 2016-08-03 15:59:25 UTC
(In reply to hoppithek from comment #5)
> In 8.1 docblock templates seam to break the php parser. Files containing
> docblock templates are not available for code completion / code navigation.

~/.netbeans/8.1/var/log/messages.log:
>WARNING [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: >/path/to/sources/ClassNameRepository.php@2081fd0a:1d0a0a73 does not lie under >AbstractFileObject@90f75a0[root of >/home/username/.netbeans/8.1/jsstubs/corestubs.zip[org.openide.filesystems.Ja>rFileSystem@63fe7770]], not indexing it
Comment 7 Tomas Mysik 2016-08-12 06:29:43 UTC
Not a defect at all.
Comment 8 hoppithek 2016-08-18 11:44:22 UTC
you can put /**#@+*/ or /**#@#*/ in any php file at any position and will kill the parser immediatly. The file has no code highlighting, no code completion is not found in the index or by codecompletion from other classes. How is this not a bug?