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 176712

Summary: Navigator for C++ somewhat broken
Product: cnd Reporter: lvskiprof <lvskiprof>
Component: Code ModelAssignee: issues@cnd <issues>
Status: NEW ---    
Severity: normal CC: lvskiprof
Priority: P4    
Version: 6.x   
Hardware: PC   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:

Description lvskiprof 2009-11-12 11:13:16 UTC
I am working on a project for a contract job that requires me to use Visual C++ 6.0, but the navigation options in there are more limited than what Netbeans provides.  So I converted the projects into Makefiles and imported them as projects with existing sources into Netbeans 6.7.1.

Navigation seem to work for some things, but not others.  Here is some example code where it fails:

struct WildWin {
    char sym_cnt[9];        // count of each symbol
    char WinSym;            // winning symbol
    char WildCount;            // number of wild symbols in hand
    char anim_bm;            // bit map for each of the symbols
} WildWin;

int CWinDisplay::GetBBWWAward(ulong *symbols, ulong flags)
{
    int won = 0;
    int i,j;

    for (i=0; i<9; i++)
        WildWin.sym_cnt[i] = 0;
    WildWin.WinSym = -1;

    WildWin.anim_bm = 0;
    for (i=0; i<3; i++) {
        ++WildWin.sym_cnt[symbols[i]];    // count the symbols
    }

    if ((j = WildWin.WildCount = WildWin.sym_cnt[BBWW_2xWILD]) == 3) {         j = 0;
        WildWin.WildCount = 0;
    }

    for (i=0; i<9; i++) {
        if ((WildWin.sym_cnt[i] + j) == 3)
        {        // look for 3 of any 1 symbol or wild
            WildWin.WinSym = i;
        }
    }
}

According to the Navigator when I ask it to show usages it says there are 0.  It does not do this for every variable/object.  So far I have only noticed it for structures declared like the one above.

A structure like this one does show proper usage info:

struct sPays g_sPays_BBWW[] = {
    BBWW_APPLE,        10,
    BBWW_1BAR,        10,
    BBWW_2BAR,        20,
};
Comment 1 Vladimir Voskresensky 2009-11-14 07:13:52 UTC
Thanks for the bug. 
just a clarification: we reference all WildWin to struct WildWin and there are 0 usages of variable WildWin (Find Usages from Navigator view)...
Comment 2 Vladimir Voskresensky 2009-11-14 07:16:55 UTC
lvskiprof, for you workaround would be to rename "struct WildWin" to "struct _WildWin" if it is possible.
Btw if WildWin is not used anywhere as struct you can try variable with unnamed struct:
struct {
    char sym_cnt[9];        // count of each symbol
    char WinSym;            // winning symbol
    char WildCount;            // number of wild symbols in hand
    char anim_bm;            // bit map for each of the symbols
} WildWin;