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 191496 - Autocomplete of namespaced classes
Summary: Autocomplete of namespaced classes
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal with 2 votes (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-31 10:04 UTC by chEbba
Modified: 2017-02-20 10:01 UTC (History)
1 user (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 chEbba 2010-10-31 10:04:23 UTC
For now, when you try to use some namespaced class it will add a fully qualified name (of course if there is no use statement already)
Example:

We have a class NS\Test\MyClass;

$myClass = new MyCl[ctrl+space] -> \NS\Test\MyClass()

It will be cool to have an availability to insert a short name + generate use "in 1 click". Because now we have to insert full name, then remove namespace portion, click [alt+enter] and choose "generate use".
Example:

$myClass = new MyCl[ctrl+space] -> \NS\Test\MyClass() OR MyClass() + generate use NS\Test\Myclass;
Comment 1 Ondrej Brejla 2012-04-24 14:21:23 UTC
You can generate use statements from used classes by a new "Fix Uses..." action. But auto-generating of use statements would be great too.
Comment 2 Xenos 2017-02-20 10:01:33 UTC
NetBeans 8.2 already has this feature:

new MyCl|Ctrl+Space will autocomplete new MyClass only if MyClass is already imported (or in the same namespace).