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 230473

Summary: "Typedef enum" name is not shown in class view
Product: cnd Reporter: Vladimir Kvashin <vkvashin>
Component: Code ModelAssignee: Vladimir Voskresensky <vv159170>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Navigator content

Description Vladimir Kvashin 2013-05-29 16:33:00 UTC
Consider the following construct

typedef enum {
  None = 0x0,
  In = 0x1,
  Inout = 0x2,
} Kind;

Navigator does not show "Kind"

With typedef struct it does
Comment 1 Vladimir Kvashin 2013-05-29 16:43:44 UTC
Created attachment 135089 [details]
Navigator content
Comment 2 Vladimir Kvashin 2013-05-29 16:45:55 UTC
The statement wasn't quite correct.
It shows both unnamed enum and typedef, and both are expandable.
This is inconsistent with the way "typedef struct" is processed:
for the later only one node is shown (and sure it has a name)

Here is code example that corresponds to the attached image

typedef enum {
  None = 0x0,
  In = 0x1,
  Inout = 0x2,
} Kind;

typedef struct {
    int x;
    int y;
} Point;
Comment 3 Vladimir Kvashin 2013-05-29 17:20:59 UTC
Debugger shows that for a union getEnclosingTypedefs() 
called from CppDeclarationNode.nodeFactory(CppDeclarationNode.java:505)
return empty collection, while for struct it returns non empty one.
Comment 4 petrk 2014-04-18 12:02:04 UTC
Fixed during fixing bug 243510