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 168167

Summary: [67cat] No usages found for anonymous class method
Product: java Reporter: ulfzibis <ulfzibis>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: REOPENED ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: No usages found for anonymous class method

Description ulfzibis 2009-07-06 10:10:00 UTC
[ BUILD # : 200906261401 ]
[ JDK VERSION : 1.6.* ]

If anonymous class, constructed from interface, overrides method from
class Object, usages of those methods from this interface are not
found.
Comment 1 ulfzibis 2009-07-06 10:10:55 UTC
Created attachment 84393 [details]
No usages found for anonymous class method
Comment 2 Max Sauer 2009-07-13 15:45:01 UTC
I can't say precisely only from the attached screenshot, but this is as designed IMHO. If inside of an anonymous class, the usages will be found only inside 
of the class itself (scope). You can check the 'Search from Base Class' CB for all toString() usages.
Comment 3 ulfzibis 2009-07-15 11:58:17 UTC
> You can check the 'Search from Base Class' CB for all toString() usages.
1. this would not help, as I don't want to see all thousands of matches for Object#toString(). I only want to find
matches for interface Reference#toString().
2. if searching for "aliases()" usages, dialogue properly displays "Search from Base Class [Reference]"

So dialogue should remember, that every interface implicitly implements all methods from class Object.

Maybe there should be 2 CB:
- "Search from Super Class/Interface [Reference]"
- "Search from Base Class/Interface [Object]"
Comment 4 Max Sauer 2009-09-29 15:27:42 UTC
Yes, this could be definitely done.