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.
That would be nice to have a same functionality for "use namespace" statement as is in Java module. What I mean is that when I want to instantiate new object, I write a class name and its namespace is auto-completed before that class name, so there is something like this: $foo = new \Bar\Foo(); But I would like to have just: namespace Whatever; use Bar\Foo; $foo = new Foo();
Don't forget to implement some fixation when class name conflict appears...in the case when there are two classes, with a same name but in different namespaces.
Maybe that behaviour could be realized by a bulb hint? Something like switching between fully qualified class name and simple name with use statement above.
I would prefer bulb hint implementation. In Visual Studio it works fine. Situation with more classes with same name in different namespaces wolud be solved easily. http://bartdesmet.info/images_wlw/CallingtheTaskSchedulerinWindowsVistaand_20ED/image_thumb_4.png
It seems that it works for me in NB 7.0.1. If I'm in some namespace, and use some class (which is not from this namespace or is not "used"), and I put a carret on the line with instantiation of that class, "bulb" hint occurs in the gutter and I can generate "use" clasues.
(In reply to comment #4) > It seems that it works for me in NB 7.0.1. If I'm in some namespace, and use > some class (which is not from this namespace or is not "used"), and I put a > carret on the line with instantiation of that class, "bulb" hint occurs in the > gutter and I can generate "use" clasues. "bulb" hint doesnt show when you're using aliases.
This hint will be removed (or absolutely rewritten). And replaced by more powerful solution.