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 213428 - Auto completion not working inside comments.
Summary: Auto completion not working inside comments.
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1.2
Hardware: All All
: P2 normal (vote)
Assignee: Ondrej Brejla
Depends on:
Reported: 2012-06-02 16:14 UTC by jkaushalya
Modified: 2017-02-20 10:15 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Screen Shot (405.29 KB, image/bmp)
2012-06-02 16:24 UTC, jkaushalya

Note You need to log in before you can comment on or make changes to this bug.
Description jkaushalya 2012-06-02 16:14:48 UTC
Product Version = NetBeans IDE 7.1.2 (Build 201204101705)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.6.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 20.0-b11

In PHP projects auto completion is not working inside the comments. For example, after /* @var It must show the variable names when typing $ and after that type. But it is not working. I tried version 7.1 and 7.1.2. But it is not working in both.
Comment 1 jkaushalya 2012-06-02 16:24:22 UTC
Created attachment 120241 [details]
Screen Shot
Comment 2 Ondrej Brejla 2012-06-04 08:12:33 UTC
Comments has been rewritten at all for NB 7.2. It's an enhancement for next release (and afaik it never worked before).
Comment 3 amobilia 2016-09-22 16:49:27 UTC
Reproductible in 8.2rc / Dev 201609210002
Comment 4 Xenos 2017-02-20 10:15:12 UTC
It actually works in NB8.2 *but* as long as the actual variable appears *prior* to the comment.

/* @var $c|Ctrl+space */
$channel = new Channel();

Shows no auto-completion while

$channel = new Channel();
/* @var $c|Ctrl+space */

Does show one.

It seems counter-intuitive to create the PHPDoc after the actual variable declaration, and move it up before... Still, it can be done that way.

It will also make the refactoring work for the PHPDoc. Ie, refactoring $channel here won't refactor the comment:

/* @var $channel Channel */
$channel = new Channel();

While here, it does so

$channel = new Channel();
/* @var $channel Channel */