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 200439 - Find usages plugin needs to limit the results by scope.
Summary: Find usages plugin needs to limit the results by scope.
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on: 199779 204058
Blocks:
  Show dependency tree
 
Reported: 2011-07-27 15:12 UTC by Ralph Ruijs
Modified: 2016-07-07 08:53 UTC (History)
8 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 Ralph Ruijs 2011-07-27 15:12:41 UTC
In 7.1 a new scope api is introduced to limit the find usages results. Please
change the find usages plugin to use this new scope api.
Comment 1 Martin Fousek 2011-10-12 08:52:02 UTC
I grep a little bit to find involved modules from our area. It seems that CSL based languages are not related. Remains these - BTW, not investigated deeply:
- groovy.refactoring
- j2ee.jpa.refactoring
- web.el
- web.jsf
- web.refactoring

Probably the best would be to distribute that over people responsible for their modules, Petr?
Comment 2 Petr Jiricka 2011-10-19 12:24:04 UTC
Cc'ing Marek and Sergey - can you please look at the cases in your modules? Thanks.
Comment 3 Sergey Petrov 2011-10-20 14:42:52 UTC
Is there any hints/documents what is required?
Comment 4 Sergey Petrov 2011-10-20 17:24:36 UTC
Ok, after some debug, in my opinion current realization is java-source centric, and do not care much about configuration files, for example if i select "current project", custom scope will contain source roots, for web project it's src/java but persistence.xml is in src/conf, and from UI pooint of view it should be in usage results (as it's in current project) but from api point of view I'm not sure. Also there is a way to select any part of source root but no way to select any part of 'src/conf' neither by folder selection nor by some chheckbox like "include non source locations". Am I miss something?
Comment 5 Sergey Petrov 2011-10-20 17:32:03 UTC
Looks like in case of persistence it wasn't used before, In my opinion it's not 100% I need to disable results in persistence.xml even if "current file/folder" etc is selected, should I? It will never be possible to narrow search result to persistence.xml only.
Comment 6 Martin Fousek 2011-10-21 06:35:18 UTC
It looks to me so as well. Similar situation for faces-config.xml which is by default placed in META-INF, WEB-INF folders (web.xml property javax.faces.CONFIG_FILES is not supported at us for now). The same with web.xml and .tld files as far as I know (web.refactoring module). Probably only usages for files which can be placed at java sources should be improved to use that Scope API? Ralph?
Comment 7 Petr Jiricka 2011-10-21 08:00:44 UTC
Seems to me as well - need to go back to the drawing board? Cc'ing also Jano.
Comment 8 Jan Becicka 2011-10-21 08:29:21 UTC
The API review for this was on July 30 -  3 month ago.
Comment 9 Martin Fousek 2011-10-21 08:49:10 UTC
I don't think that it's necessary to review that API. I would like just to know if our theory is right - that it's related only for files placed at java sources. I think that it's corner case to reduce scope by searching for/in XML configuration files. Thanks.
Comment 10 Ralph Ruijs 2011-10-21 11:26:44 UTC
After discussing it with Martin and Jan, we think the current implementation is good for 7.1. I will change the Custom Scope Dialog to make it possible to select non-java files/folders as described by #204058. After which, #200439 can be fixed as well.
Comment 11 Martin Fousek 2012-11-26 07:49:37 UTC
I think that it's too late for such changes into this release even the #204058 would be fixed, target milestone set to Next.
Comment 12 Martin Balin 2016-07-07 08:53:33 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss