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 206521

Summary: Autocompletion does not work for static members with fully qualified namespaces
Product: php Reporter: marcusson <marcusson>
Component: EditorAssignee: Ondrej Brejla <obrejla>
Status: VERIFIED FIXED    
Severity: normal CC: Anakonda, evandelacruz, mmirilovic, RadekDvorak, vriha, zeliret
Priority: P2    
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description marcusson 2011-12-19 10:15:13 UTC
I'm using dev-build 201112140600.

I noticed that auto-completion does not work for static members on fully classified namespaces.

<?php

namespace A;

class MockClass
{
    public static $a = 1;
}

class TestCase
{

    public function test()
    {
        MockClass::$a; // auto-complete works
        \A\MockClass::; // auto-complete doesn't work
    }
}
?>
Comment 1 Ondrej Brejla 2011-12-20 09:29:44 UTC
Reproducible in 7.2dev.
Comment 2 stack90 2012-01-06 02:32:09 UTC
This test should re-produce the problem, however, the code-completion works as expected on Netbeans 7.0.1 if that helps fix it any.

-- File foo.php
<?php
namespace Name1;
class Foo {
    static public function bar() {}
}

-- File bar.php
<?php
namespace Name2;
class Bar {
    static public function foo() {}
}

-- File test.php
<?php
    \Name1\Foo::bar();
    \Name2\Bar::foo();
?>
Comment 3 Ondrej Brejla 2012-01-09 08:53:32 UTC
*** Bug 207050 has been marked as a duplicate of this bug. ***
Comment 4 Ondrej Brejla 2012-01-10 13:31:33 UTC
Fixed in web-main: http://hg.netbeans.org/web-main/rev/327ca64d3920

It's a candidate for 7.1 patch 1 (it's regression). Vlado, please, can you verify that? Example in the first comment is useable for a test. Thanks!
Comment 5 Ondrej Brejla 2012-01-10 14:42:47 UTC
*** Bug 207127 has been marked as a duplicate of this bug. ***
Comment 6 Vladimir Riha 2012-01-11 13:44:24 UTC
While verifying I noticed issue #207175, not sure if it's related to this fix. Anyway this works good, so verified.


Product Version: NetBeans IDE Dev (Build web-main-6696-on-20120111)
Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10
System: Linux version 3.0.0-14-generic-pae running on i386; UTF-8; en_US (nb)
Comment 7 marcusson 2012-01-11 15:26:46 UTC
I cross-tested the last comment and noticed that the fix is not there in the nighlty Dev build 20120109601 and neither is issue #207175. So I also assume that the issue might be related to the fix.

However: so far I have no current version after the fix to positively verify the bug.
Comment 8 Quality Engineering 2012-01-11 16:16:53 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/327ca64d3920
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #206521 - Autocompletion does not work for static members with fully qualified namespaces
Comment 9 Ondrej Brejla 2012-01-11 16:27:48 UTC
*** Bug 207162 has been marked as a duplicate of this bug. ***
Comment 10 Ondrej Brejla 2012-01-25 10:45:26 UTC
*** Bug 207425 has been marked as a duplicate of this bug. ***
Comment 11 Vladimir Riha 2012-02-13 12:11:11 UTC
verified 7.1.1

Product Version: NetBeans IDE 7.1.1 (Build 201202122200)
Comment 12 qwertzalcoatl 2012-03-08 13:57:18 UTC
I have this problem in 7.1.1. (Mac OSX) Downgrade to 7.1 solved this, as well as using the Nightly Build
Comment 13 Ondrej Brejla 2012-03-08 14:34:33 UTC
This bug is verified and fixed. If you have another issue, create new one with test cases. Thanks.

(This patch fixed some issue which appeared in 7.1 so solving via downgrading to 7.1 is nonsense).
Comment 14 Anakonda 2012-03-08 15:15:27 UTC
It's work only after full reinstall 7.1.1
Comment 15 ru_lex 2012-07-08 14:02:02 UTC
I'm have some problem (7.1.2)
Don't work code walking to namespace's Classes and theirs static methods.
This functional is very usbility needed
Today it isn't fixed in public versions? (http://netbeans.org/downloads/index.html)
Comment 16 ru_lex 2012-07-08 14:32:29 UTC
(In reply to comment #15)
> I'm have some problem (7.1.2)
> Don't work code walking to namespace's Classes and theirs static methods.
> This functional is very usbility needed
> Today it isn't fixed in public versions?
> (http://netbeans.org/downloads/index.html)

i have posted: http://netbeans.org/bugzilla/show_bug.cgi?id=215250
Comment 17 Ondrej Brejla 2012-07-09 07:22:49 UTC
Please, don't change properly set tags...thanks.