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 269005 - Namespace suggestion for new files
Summary: Namespace suggestion for new files
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: Dev
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Tomas Mysik
Depends on:
Reported: 2016-11-16 13:57 UTC by twifty
Modified: 2016-11-17 12:34 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description twifty 2016-11-16 13:57:53 UTC
When using the IDE to add a new php class/interface, the dialogue window has a "Namespace" drop down box. This box is only populated IF namespaced files already exist in the directory. When the directory is empty, no suggestions are available and we have to type the full namespace. Recently this cause me no end of problems when I incorrectly spelled one of the uppers directory names.

When adding a new file, check for namespaces available in the parent directory, append the new directory name and offer them as suggestions.
Comment 1 eviweb 2016-11-17 12:34:16 UTC

It also would be great, for composer based PHP project, if namespace suggestions could be based on the PSR-0 and PSR-4 mappings of the composer.json autoload setting.

But maybe this should be part of another ticket...

Best regards