I am using Netbeans 8.0 for PHP
I try to use code completion feature, when I type
new EntityM
Netbeans shows:
great so far, I hit enter on the first option, then Netbeans generates:
What I want to do: Instead of generating a full class name (namespace+class name) I want Netbeans to add a use statement and a simple class name, this will add:
use \Doctrine\ORM\EntityManager;
before my class declaration and the generated code will be:
$d = new EntityManager($conn, $config, $eventManager)
Anyone could advise how to achieve this?
PS: This is exactly how PHPStorm works.
IMHO not possible now, there is some enhancement in NetBeans' bugzilla. The "workaround" is to let NetBeans insert FQN and then press Ctrl+Shift+I to fix namespaces, this will remove FQN and insert use statements.