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.
Scenario: Add another interface to existing namespace. Other interfaces are in same folder. Current behavior: 1. Click "New -> PHP Interface" 2. Window pop up. 3. "Namespace" combo box is empty Expected behavior: 1. Click "New -> PHP Interface" 2. Window pop up. 3. "Namespace" combo box contains same namespace as other interfaces in folder This works properly when creating classes, but not interfaces. Tried in build 201509090002, however as far as I remember it is not working properly from a long time.
Probably, project area. Thanks.
One more important note about this issue: This fails if in folder are only interfaces or traits (in this case it fails for classes too). If it contains classes, namespace is guessed properly. Looks like interfaces and traits are not checked when searching for namespace.
If would be very nice if the system could guess the namespace based on the folder where the class/interface was going to be created in the "New Class/Interface" dialog window. If this is not possible or difficult to implement then perhaps it is easier to "find/replace" the directory separator (/)(on *nix) with the namespace separator (\). This way we can just copy and paste the Folder to Namespace and have a quick way of auto-completing the empty namespace.
Re: gevik@netbeans.org It works when folder contains classes. So guessing namespace is implemented. It fails if it contains only interfaces or traits. Like these are not scanned?
(In reply to pmaselkowski from comment #4) > It fails if it contains only interfaces or traits. Like these are not > scanned? Exactly. Will try to fix it. Thanks for reporting.
Should be fixed now I hope. Please verify, thanks. http://hg.netbeans.org/web-main/rev/1dabe925c878
(In reply to Tomas Mysik from comment #6) > Should be fixed now I hope. Please verify, thanks. > > http://hg.netbeans.org/web-main/rev/1dabe925c878 Now works fine, thanks! That bug was pretty annoying.
Thanks for verification.