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 - "Typedef enum" name is not shown in class view
Summary: "Typedef enum" name is not shown in class view
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-29 16:33 UTC by Vladimir Kvashin
Modified: 2014-04-22 16:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Navigator content (7.87 KB, image/png)
2013-05-29 16:43 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
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