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.
Summary: | Refactoring: only usages are changed, #define in header from the refactoring was called, remains unchanged | ||
---|---|---|---|
Product: | cnd | Reporter: | mariusz_m |
Component: | Code Model | Assignee: | Egor Ushakov <gorrus> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | apepin |
Priority: | P1 | Keywords: | 7.4_HR_FIX, REGRESSION |
Version: | 7.4 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
IDE log
var/log/messages screenshoot code diagnostic dump |
Description
mariusz_m
2013-03-29 16:50:23 UTC
Created attachment 133218 [details]
IDE log
mariusz_m, Could you, please, provide more details (ideally steps or test case to reproduce) Ok, First, this bug appeared first on 7.3, it newer happened in 7.2 Second - I have no idea how to ideally reproduce, but the steps are as follows: - you have some variable int MyCounter defined in program.cpp - in program.h variable is defined as extern int MyCounter - this variable is used in a few other files - now, open program.h, set cursor over MyCounter and press Ctrl+R to show refactoring dialog - enter a new name, lets say, EventCounter, and click Refactor - it looks like nothing happened, the variable name is still MyCounter, but if you looks into program.cpp you can see that variable rename was made This is not a rule - most time it works as expected, but if broken once, I have to restart NB to make it working again. A few days ago I did an update from help->Check for updates, so maybe it is already fixed. I will let you know if it happen again Created attachment 133336 [details]
var/log/messages
Module C/C++ Refactoring threw java.lang.IllegalArgumentException: Unit: D:/Dokumenty/Projekty/EGOL/eGOL/Source/N/ FileIndex: 923 CacheSize: 780 Thread=OpenIDE-request-processor-14. Please report a bug against C/C++ Refactoring module and attach your var/log/messages.log. What I observe is that 'Find occurrences' is not working (always find nothing until NB restart). Maybe this is connected to refactoring module? I'm still working on my project in NB, and these are my observations: - refactoring is made local if the variable is local to some function, and renaming is done 'in place' (this mean I change selected name in the main editor), or global, and then Rename dialog box is showing - when I want do a local variable rename, and the file is unchanged, NB enter in place rename mode - when I want do a local variable rename, and the file is changed and NOT SAVED, then, sometimes (lets say 30%), NB enter global rename mode - is such a situations, when I type new name and click rename, nothing is changed. If I cancel this dialog box and press Ctr+R again, NB enter to in place rename mode and everything works fine. The issue when NB functions are not working correctly on unsaved files is probably connected to #224011 Created attachment 140464 [details]
screenshoot
Created attachment 140465 [details]
code diagnostic dump
Product Version = NetBeans IDE 7.4 RC1 (Build 201309162201) 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 This issue is still not fixed. Take a look at the video capture and the full code model dump. This is a regression after text index introduction, simple test case: - #define AAA 1 - and no usage anywhere - find usages on this AAA gives 0 results fixed in 3ef6b6882a29 reviewed: fix is correct and safe fix in cnd-main: http://hg.netbeans.org/cnd-main/rev/1a9cbd24f3d4 Both testcases verified in dev cnd build. Please push the fix into release branch. integrated into release74: http://hg.netbeans.org/releases/rev/fa288ee4a9e4 Integrated into 'releases/release74', will be available in build *201311111738* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/b8df46d1b0a5 User: Egor Ushakov <gorrus@netbeans.org> Log: test for Bug 228094 - Refactoring: only usages are changed, #define in header from the refactoring was called, remains unchanged (transplanted from b54ac7a57e5bddc3967c3a14b76942f62dcede4b) |