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.
Compound SearchInfo is a proxy SearchInfo that delegates to other SearchInfo objects (it is analogous to ProxyLookup). It combines the delegates such that: - its method canSearch() returns true if and only if at least one of the delegate's canSearch() returns true - its method objectsToSearch() chains iterators of the delegates, skipping those delegates whose canSearch() method returns false I need the functionality in modules "Utilities" and "Utilities/Projects" for implementation of redesigned Search/Search&Replace dialogs. The target milestone is 6.0 M10. The functionality has been part of the OpenideX module since the SearchInfo interfaces has been introduced, it just has not been public. The planned change just makes it available through a public factory method, i.e. it adds one public static API method public static SearchInfo createCompoundSearchInfo(SearchInfo[] delegates) to class SearchInfoFactory. I expect no impact of the change except that the method (and thus the functionality) becomes available.
Created attachment 42882 [details] diff of apichanges.xml
Consider using varargs (i.e. SearchInfo...) if there is some reasonable chance someone would want to call the method with a statically fixed number of SearchInfo parameters. Consistent with ProxyLookup and many other calls.
Yes, it is possible somebody could use it. I will change it to varargs.
The OpenideX module is still Java 1.4-based. I am not sure it is worth switching to 1.5 just to use var-args in one method, especially that I do not see any real-life need for it.
openidex depends on openide/util (at least) and that requires 1.5, so feel free to switch to 1.5 - probably also generify all the other methods and classes there...
The current version of openidex did not depend on a version of Utilities API requiring JDK 1.5 (it could work with org.openide.util 6.2 which does not require JDK 1.5). Anyway, I switched it to JDK 1.5 so I can use the var-arg parameter. Is it OK to commit the change?
Yes please, the more modules we have on JDK 5 the better (IMO).
Committed to CVS (into trunk). Modified files: openidex/manifest.mf (1.42) openidex/api/apichanges.xml (1.8) openidex/src/org/openidex/search/SearchInfoFactory.java (1.6) Diffs: http://openidex.netbeans.org/source/browse/openidex/manifest.mf?r1=1.41&r2=1.42&diff_format=u http://openidex.netbeans.org/source/browse/openidex/api/apichanges.xml?r1=1.7&r2=1.8&diff_format=u http://openidex.netbeans.org/source/browse/openidex/src/org/openidex/search/SearchInfoFactory.java?r1=1.5&r2=1.6&diff_format=u