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 231272 - Renaming of fields does not recognize type the field belongs
Summary: Renaming of fields does not recognize type the field belongs
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Navigation (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-14 11:01 UTC by mariusz_m
Modified: 2013-06-25 02:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
example project (13.79 KB, application/zip)
2013-06-14 11:01 UTC, mariusz_m
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mariusz_m 2013-06-14 11:01:13 UTC
Created attachment 135799 [details]
example project

Sample code:

typedef struct
{
	int8_t	Type;
	int32_t	Width;
	int32_t Height;
} Object1;

typedef struct
{
	int8_t	Type;
	int32_t	Width;
	int32_t Height;
} Object2;

int main()
{
	Object1 o1;
	Object2 o2;

	o2.Type = o1.Type;
	o2.Width = o1.Width;
	o2.Height = o1.Height;

	return o2.Width;
}


Now, try to rename Object2.Type to 'Type2' -> field Type in Object1 will also be renamed.

Sample project included.
I'v found it not happens if structures are defined and used in the same file, thus, definitions in my example are in welcome.h

---
Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.7.0_11
Runtime = Java HotSpot(TM) Client VM 23.6-b04
Comment 1 Leonid Lenyashin 2013-06-14 11:57:14 UTC
Please evaluate against Show Stopper status
Comment 2 Leonid Lenyashin 2013-06-14 13:22:13 UTC
is it reproducible in 7.4? If it is only for patching purpose and not seen in
7.4 then please put NO74 keyword here
Comment 3 Leonid Lenyashin 2013-06-14 13:23:30 UTC
(In reply to comment #2)
> is it reproducible in 7.4? If it is only for patching purpose and not seen in
> 7.4 then please put NO74 keyword here

Please disreagard
Comment 4 mariusz_m 2013-06-14 18:29:13 UTC
I should mention here that FindUsages acts very the same. If some field name occurs in two different structures, NB is not recognizing it and returns all occurrences of this name
Comment 5 Leonid Lenyashin 2013-06-17 08:56:46 UTC
Egor, could you pls evaluate this bug.
Comment 6 Egor Ushakov 2013-06-17 10:20:27 UTC
confirmed in 7.4
Comment 7 Egor Ushakov 2013-06-17 16:07:36 UTC
not a showstopper for beta
Comment 8 Vladimir Voskresensky 2013-06-24 09:19:42 UTC
http://hg.netbeans.org/cnd-main/rev/6bc926a0ea77
Comment 9 Quality Engineering 2013-06-25 02:46:12 UTC
Integrated into 'main-golden', will be available in build *201306242301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6bc926a0ea77
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #231272 - Renaming of fields does not recognize type the field belongs