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 212695 - Find Usages on method finds also itself
Summary: Find Usages on method finds also itself
Status: NEW
Alias: None
Product: php
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.2
Hardware: All All
: P4 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-18 11:35 UTC by Jiri Kovalsky
Modified: 2012-05-18 12:55 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 Jiri Kovalsky 2012-05-18 11:35:24 UTC
Product Version: NetBeans IDE Dev (Build 201205160400)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/dev
Cache directory: /home/cesilko/.cache/netbeans/dev

Steps to reproduce:
===================
If user invokes "Find Usages" on a class method, the method itself shows up in this search result too. I believe this is not as designed, is it?

Steps to reproduce:
===================
1. Generate TodoList sample PHP application.
2. Open "Source Files > dao > TodoDao.php" into Editor.
3. On line 64 right click "find" method name and invoke "Find Usages" from its popup menu.
4. Push "Find" button in "Find Usages" dialog.
5. "Usages" output tab will contain also "TodoDao.php" node with "64  public function find(TodoSearchCriteria $search = null) {" subnode.
Comment 1 Ondrej Brejla 2012-05-18 12:55:39 UTC
I think that it is (in the current infrastrucuture), because same "occurence" result is used for rename refactoring. It's still the same behavior as it was in the first version of PHP Refactoring. Now declarations can't be simply removed from that results.

And I'm not sure, if they should be removed :) I think that it depends on each users preference. For me it's comfortable to see "every usage - occurence" of a method.

I'll think about it, but it's not a P3, it's just a cosmetic issue :) (understand, nothing important is missing) and it will not be improved for 7.2, because too much work has to be done with it.

Thanks for reporting!