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.
Maven refactoring plugin does some indexing in maven repositories even if no maven project is used. Maven Plugin Factory should return null if non-maven projects are being refactored/searched.
jesse, comments? what is the purpose of the find usage refactoring plugin that searches in local repo?
(In reply to comment #0) > Maven refactoring plugin does some indexing in maven repositories It should never do any indexing; it may consult with an existing index if one is ready, which ought to be quite fast. What specifically did you observe as the slowdown? > Maven Plugin Factory should return null if non-maven > projects are being refactored/searched. Perhaps so. Can still be useful to see Maven-based usages of an API even if the known clients are using Ant. A little subtle to specify what it means for a Maven-based project to be searched, because the type being searched might actually be in a Maven project, or it might be in a binary repository artifact. (In reply to comment #1) > what is the purpose of the find usage refactoring plugin that > searches in local repo? To inform you of usages of an API beyond your open projects [1]. Otherwise you have no way to find such usages other than checking out and opening every project which might possibly use it, and waiting a long time for them all to be scanned. [1] http://wiki.netbeans.org/NewAndNoteworthyNB71#Find_Usages_2
(In reply to comment #2) > It should never do any indexing; it may consult with an existing index if one > is ready, which ought to be quite fast. What specifically did you observe as > the slowdown? I saw some progress bar (in status bar) doing something with maven. > Perhaps so. Can still be useful to see Maven-based usages of an API even if the > known clients are using Ant. > > A little subtle to specify what it means for a Maven-based project to be > searched, because the type being searched might actually be in a Maven project, > or it might be in a binary repository artifact. Find usages has Scope, which is "open projects" "current project" etc. If you think, that your clients want to see something from maven universe, there should be specific scope for it. And since there is no such scope, it is not acceptable to slow down Find Usages just for few people, which "might be interested" in something from maven.
(In reply to comment #3) > (In reply to comment #2) > > It should never do any indexing; it may consult with an existing index if one > > is ready, which ought to be quite fast. What specifically did you observe as > > the slowdown? > > I saw some progress bar (in status bar) doing something with maven. afaik it does trigger index download/local repo scan if these don't exist currently.
It calls RepositoryQueries.findClassUsagesResult("...", null).getResults(), which is supposed to use only existing indices. When there are no loaded indices, this ought to immediately return an empty list. It seems that the refactorings in 7.2 caused this to trigger local repo indexing, which it did not use to do and which the class Javadoc does not indicate it should do. 2809e8de3470 in particular seems to have regressed this. (In reply to comment #3) > there should be specific scope for it Would be nice, but impossible via current APIs AFAIK; WhereUsedPanel hardcodes the list of special scopes. (bug #191334 comment #33) Anyway, a bit off topic here.
core-main #1d084767860b
Integrated into 'main-golden', will be available in build *201204021038* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/dac79e2be97f User: Jesse Glick <jglick@netbeans.org> Log: Cleaner fix of #209856 according to mkleint; caller, not impl, controls whether indexing is triggered.
Integrated into 'main-golden', will be available in build *201204040400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/93fed910e2ef User: Milos Kleint <mkleint@netbeans.org> Log: #209856 passing null as list of repositories means all defined repositories, to use justr the loaded ones without triggering scan, use the getLoadedContexts() method