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 132646

Summary: Static methods doesn't is appears in code completion listbox
Product: cnd Reporter: soldatov <soldatov>
Component: Code CompletionAssignee: Vladimir Voskresensky <vv159170>
Status: VERIFIED FIXED    
Severity: blocker CC: sustaining
Priority: P2    
Version: 6.x   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description soldatov 2008-04-11 18:13:42 UTC
I investigated code completion in Qt project and found such problem. Static methods doesn't is appears in code
completion listbox.

Simple testcase:
- Create on disk c:/lib/test.h file
==================================

class A {
public:

    int f1() {}
    static int f2() {}

protected:

    int f3() {}
    static int f4() {}

private:

    int f5() {}
    static int f6() {}

};

==================================
- Create C++ project
- Add 'c:/lib' path into project properties
- Create new C++ file with such code:
==================================

#include <stdlib.h>
#include "test.h"

int main(int argc, char** argv) {
    A* a = new A();
    A::f2();
    a->f1();
    a->f2();
    return (EXIT_SUCCESS);
}

==================================
==> Code completion works correctly in 'a->f1();' and 'a->f2();' line
    Code completion doesn't work after 'A::'
Comment 1 Vladimir Voskresensky 2008-04-11 18:40:42 UTC
thanks,
As I see this is the case only when class is defined in library 
for own project classes it works fine...
Comment 3 Alexander Pepin 2008-04-15 16:51:51 UTC
verified in NB6.1RC1 with provided org-netbeans-modules-cnd-completion.jar
Comment 4 soldatov 2008-04-23 13:12:01 UTC
verified in trunk (Build 200804190003)
Comment 5 jinb 2008-05-03 16:42:37 UTC
fix backported into release61_fixes branch
changeset:   77534:1ba52d2dc191
Comment 6 jinb 2008-05-03 17:43:52 UTC
fix backported into release61_fixes branch
add new file(testLibraryClassStaticFunctions.ref) changeset
http://hg.netbeans.org/release61_fixes/rev/afa066026a2c