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.
Hello, looks like there is a problem with namespaces. So, for example, we have 2 namespaces: Core and Data. And we have 2 classes with equal names (e.g. User) in those namespaces. And there is a method in \Core\User: /** * Some method in \Core\User, wich has a \Data\User as an argument. * @param \Data\User $var1 */ public function TheMethod($var1) { //And here I simply create a new object of \Data\User class $var2 = new \Data\User(); } And when I write "$var1->" or "$var2->" and press Ctrl+Space, properties and methods of \Data\User are supposed to appear. But I see autocomplete for \Core\User class. And it makes me very-very sad. :) So, here is the bug. But, by the way, as soon as I create an alias for \Data\User and use alias, it works properly.
I have tried your example with the dev build and I see in the code completion item list methods from both User classes. Do you see only from the Core\User?
(In reply to comment #1) > I have tried your example with the dev build and I see in the code completion > item list methods from both User classes. Do you see only from the Core\User? I use stable build 7.0.1 (Build 201107282000), and yes, I see completion items only from the Core\User.
I see methods and properties from both classes NB 7.0.1...and it's annoying too ;) Same behaviour in NB 7.1dev.
I have find out that if you split the namespaces into two separate files, then code completion really offers only the methods from Core\User class.
Fixed in web-main: http://hg.netbeans.org/web-main/rev/b76268950355
Integrated into 'main-golden', will be available in build *201109100600* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/b76268950355 User: Ondrej Brejla <obrejla@netbeans.org> Log: #201452 - Problem with equally named classes in different namespaces
verified