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 227055 - NetBeans 7.3 refactoring and find usages for Java files is broken
Summary: NetBeans 7.3 refactoring and find usages for Java files is broken
Status: RESOLVED DUPLICATE of bug 226803
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P1 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-05 17:12 UTC by netbeansuzr
Modified: 2013-03-06 15:14 UTC (History)
0 users

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 netbeansuzr 2013-03-05 17:12:08 UTC
Find usages usually finds no usages or not all the usages when on Netbeasn 7.3 (worked fine on 7.2) Refactoring also misses most usages and as such is unusable.

This makes netbeans 7.3 almost completely useless and I had to downgrade back to 7.2

I have tried deleting both my cache and config directories for netbeans and restarting with no affect.  Netbeans is using JDK 1.7_05.
Comment 1 Ralph Ruijs 2013-03-05 17:47:17 UTC
Can you give some more information about how to reproduce this? Can you attach the messages.log ?

Could be a duplicate of #226803.
Comment 2 netbeansuzr 2013-03-05 18:16:38 UTC
Hi Thanks for your quick response.  For reproducing i'm I don't have any simple test case i'm just trying to use refactoring in a large project.  What I can say which may help is that I have Class A implementing interface B.  I have seen this issue happening when I click on the interface name in class A as in:

public class A implements B

I click on B (so the cursor is in the class name (the name is more than 1 character in my case) and then hit Ctrl-R for rename refactoring, netbeans shows the usual dialog and I do the rename, but it only renames the interface and catches some usages sometimes but it doesn't rename the class name in A on the line:
public class A implements B

even though i did the rename from class A.  It's the exact same behaviour if i do the rename on the interface class.  It still misses the implements line.

Another thing to note is find usages doesn't work if i choose "All open projects" in the find usages dialog.  Sometimes it works if i select "current project".  It also doesn't work if i go to "custom filter".  I did however get find usages to work when i click on "custom filter", then hit the button beside it to modify the project included and check all my open projects.  However I have to do this at least every time i restart netbeans and maybe even more.

I think the above details should be helpful in reproducing and fixing this issue.  If needed I will try to provide more information.

Another thing to note is that this worked fine under 7.2, and i'm sure you are already aware but in the changelog for 7.3 you guys have made some refactoring changes (perhaps these had something to do with the broken functionality?):

Java
Set of new hints and refactorings
Filters for Find Usages results

Groovy
Basic refactoring implemented (Find Usages, Rename for class type)
Comment 3 Ralph Ruijs 2013-03-05 20:46:02 UTC
I tried the steps you described in a couple of projects, varying from small to bigger, but I'm still not able to reproduce. Could you try a nightly build and check if this solves the issue? Anything after 2013-03-01 is ok.

http://bits.netbeans.org/dev/nightly/
Comment 4 netbeansuzr 2013-03-06 14:40:27 UTC
I have tried the nightly build netbeans-trunk-nightly-201303042300.zip and with some early testing, the find usages and refactoring seem to be working as expected so far.

Can we please get these fixes for find usages and refactoring fast tracked as a critical update?

How will the update come through? Will netbeans show an updates available icon in the bottom right?

Thanks again for looking into this so quickly.
Comment 5 Ralph Ruijs 2013-03-06 15:07:44 UTC
(In reply to comment #4)
> I have tried the nightly build netbeans-trunk-nightly-201303042300.zip and with
> some early testing, the find usages and refactoring seem to be working as
> expected so far.
> 
> Can we please get these fixes for find usages and refactoring fast tracked as a
> critical update?

The fix will be part of 7.3.1.

> How will the update come through? Will netbeans show an updates available icon
> in the bottom right?

Once the patch release is ready, it will be available from the update center. Yes, there should be an icon in the bottom right.

> Thanks again for looking into this so quickly.

Thank you for the report.

*** This bug has been marked as a duplicate of bug 226803 ***
Comment 6 netbeansuzr 2013-03-06 15:14:11 UTC
One more question when is 7.3.1 scheduled for release?