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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-16 13:57 UTC by twifty
Modified: 2016-11-17 12:34 UTC (History)
0 users

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 twifty 2016-11-16 13:57:53 UTC
Problem:
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.

Solution:
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
Hi,

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

Eric