Netbeans should accept it, at least my version 6.9 for
/* @var $this Bar */
does this:
and that is an example with the include scenario (no class around).
Take care to use the single-line - single-asterisk - type-of - commment.
Also take care Netbeans updated the index. As in your case:
NetBeans had to scan for changes in this case, which I would have assumed it would do automatically. [...]. In my case it only periodically scans.
Docblock variable hinting related: