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 123161

Summary: Refactoring - Support for find usages
Product: groovy Reporter: schmidtm <schmidtm>
Component: EditorAssignee: Martin Janicek <mjanicek>
Status: RESOLVED FIXED    
Severity: blocker CC: pjiricka, wadechandler
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://wiki.netbeans.org/wiki/view/Groovygrails
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 151987    

Description schmidtm 2007-11-30 16:59:34 UTC
Find usages of groovy type ( Classes, Methods, Fields, etc )
Comment 1 _ wadechandler 2011-11-04 17:36:13 UTC
I know there is a shortage of resources for Groovy work in NB at the moment, but I wanted to go ahead and change this to a P1 and make it a DEFECT that this functionality is not available since it is core functionality to users of NetBeans.
Comment 2 Petr Hejl 2011-11-04 17:56:49 UTC
I don't think unimplemented feature is a defect.
Comment 3 _ wadechandler 2011-11-07 11:42:31 UTC
Changed to a P3 and assigned to myself. I will attempt to look at this one. Thanks Petr.
Comment 4 akochnev 2011-12-20 14:47:57 UTC
I think this IS a defect. The "Find Usages" menu is present inside of Groovy code; when you select it from the context menu, it shows the find usages dialog. However, when you try to run it, it does nothing. 

If "Find Usages" is not expected to work in Groovy, then the menu item should not be available
Comment 5 Martin Janicek 2011-12-20 17:14:50 UTC
I've already started to implement this - It's marked as enhancement because there isn't any related code which should implement such a feature (the presence of 'Find Usages' in context menu is nice, but doesn't mean that we have some code behind it - it's actually there because we didn't hide it explicitly :])
Comment 6 Martin Janicek 2012-09-03 14:41:11 UTC
Ok, I've implemented find usages for some basic constructs. It's certainly not perfect and it will needs a lot fixes and improvements, but I need to start somehow :)
I would like to ask all of you to test it as much as possible and file a new issues to the cases where it doesn't work as expected (e.g. some occurrences which should be in usages isn't there etc.) ..it's really important for me because I don't have real Groovy project and thus I can test only some simple cases. As we are entering the bug fixing phase I can promise, that with your help we can make groovy find usages really useful for the next release.

..as there is 30+ revisions behind the implementation I'll add only the activation changeset: http://hg.netbeans.org/main-silver/rev/92ab6b38207d
(the whole implementation could be found in Groovy Refactoring module)
Comment 7 Martin Janicek 2012-09-03 14:49:32 UTC
Note: Please be aware that the current version is focusing only on the .groovy files. That means it won't find any usages from the .java files. I know it's not ideal, but as I said.. we have to start somehow.