Doctrine2 Netbeans IDE problems with code completion

Doctrine2/Symfony2 project? You write a code, press ctrl + space and… no all code completion… Why?

$em = $this->getDoctrine()->getManager();
$query = $em-> (should be createQuery, createBuilderQuery BUT nothing like that)

Solutions is simple (as usual…) but take some time to know how…Simply you must declare type of $em variable. Just put

$em = $this->getDoctrine()->getManager();

/* @var $em \Doctrine\ORM\EntityManager */

That is! It works for me in Netbeans 7.3RC1