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 132536 - *Find Usages* doesn't work for local variables in RC1
Summary: *Find Usages* doesn't work for local variables in RC1
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-10 15:08 UTC by dnikitin
Modified: 2008-04-17 13:10 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dnikitin 2008-04-10 15:08:25 UTC
Product Version: NetBeans IDE 6.1 RC1 (Build 200804100130)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19
System: Linux version 2.6.20-16-generic running on i386; UTF-8; en_US (nb)

RC1 from 
http://bits.netbeans.org/6.1/rc1_hard_to_guess_dir/latest/

-- open Args sample project
-- invoke find usages for local variable i
==> 0 occurrences

in build NetBeans IDE Dev (Build 200804082140) 
from http://bits.netbeans.org/download/6.1/nightly/
all have been working.
Comment 1 Leonid Lenyashin 2008-04-10 15:18:35 UTC
My suggestion is to make it P1. This is a defining feature for 6.1.
Comment 2 Alexander Pepin 2008-04-10 15:26:00 UTC
Agreed
Comment 3 Sergey Grinev 2008-04-10 15:57:37 UTC
Tested on current *trunk* build and on current *release61* branch build. Can't reproduce. 
It's reproducible only on build which can be downloaded from the link above.

Tracing gives next result: 
o.n.m.cnd.refactoring.plugins.CsmWhereUsedQueryPlugin.prepare():90 fails on

lookup(CsmUID.class) call

Can lookup problems being the results of different build procedure? Sources seem to be the same along the workflow of
Find Usages according to tracer. 
I've mailed Michal Zlaman and asked for details about build.
Comment 4 Vladimir Voskresensky 2008-04-10 16:27:28 UTC
I can confirm, that sources in responsible module cnd.refactoring are the same in trunk and release61 => seems the
problem of release build process.
Is it possible to verify jar? 
Comment 5 Vladimir Voskresensky 2008-04-10 17:15:50 UTC
Ok. the problem is investigated. 
Refactoring module perform the check (in debug mode) of repository. And when repository fails it makes backup.
Seems local variables are not correctly handled by repository => in release mode no backup => no Find Usages

I have a simple fix.
Comment 6 Petr Blaha 2008-04-10 17:17:10 UTC
Please, fix the issue in the trunk and follow up the HR rules.
Comment 7 Vladimir Voskresensky 2008-04-10 17:26:03 UTC
pushed in trunk:
http://hg.netbeans.org/main?cmd=changeset;node=c6a5c247baa1

QA, please, verify by running trunk version with -J-da flag (to simulate release run)
Comment 8 Sergey Grinev 2008-04-10 17:53:54 UTC
code have been reviewed and tested on trunk and release61 branch. Fix works.
Comment 9 Alexander Pepin 2008-04-10 19:45:17 UTC
verified in NB6.1RC1 with org-netbeans-modules-cnd-refactoring.jar provided by developers
Comment 10 Vladimir Voskresensky 2008-04-10 20:37:52 UTC
integrated in release61:
 http://hg.netbeans.org/release61?cmd=changeset;node=61fd7715be30
Comment 11 Vladimir Kvashin 2008-04-11 06:12:05 UTC
The comment concerning the push into trunk refers to the wrong changeset.
The correct one is the following:
http://hg.netbeans.org/main?cmd=changeset;node=1a6fd35f2599
Comment 12 dnikitin 2008-04-17 13:10:57 UTC
Verified in RC2