Community
Participate
Working Groups
Build Identifier: I20100608-0911 (Eclipse 3.6 Helios) See attached an Update Site zip file, that contains features for both Windows and Linux. The GUI doesn't differentiate between them, and the display shows as if the same features shows twice. But as per screenshot attached, you could select one of them, and it could be for the wrong OS, which is detected and error presented to user. So this detection could be done earlier, and the display filtered to show only the feature matching the current OS. Reproducible: Always Steps to Reproduce: 1. Download and unzip the attached CC.zip file (it is an Update Site). 2. Start Eclipse, click Help->Install New Software 3. Click on Add and point to the unzipped Update Site from 1. 4. Uncheck "Group Items by Category" 5. You will see two identical entries, as per screenshot 6. Try picking one, then the other, and you will get an error when you pick the Linux one and you are on Windows.
Created attachment 178102 [details] Screenshots of Update Site
Created attachment 178103 [details] picked the wrong OS
This behavior is reproducible in 3.5 as well as 3.6. Example Update Site file CC.zip is 3MB, so too large to attach directly it seems. Looking for alternatives.
Created attachment 178115 [details] Testcase Update site
The content of attachment 178115 [details] has been deleted by Denis Roy <denis.roy@eclipse.org> who provided the following reason: Deleted as requested by the team The token used to delete this attachment was generated at 2010-09-03 17:30:56 EDT.
Thomas, I believe this should be done in the UI but I am having problems writing the proper query. Basically it should be a query which is "all IUs whose filter matches the given os/ws/nl combo". I've tried writing some compound queries but keep getting an IllegalArgumentException when I get to the filter matching part. I've looked at the doc on the wiki but am stumped. Do you have any suggestions? Thanks.
The IU filter will match against a special IU (the 'context' IU). You can create this IU like this: Map env = new Hashtable(); env.put("osgi.os", "linux"); env.put("osgi.ws", "gtk"); env.put("osgi.arch", "x86"); IInstallableUnit envIU = InstallableUnit.contextIU(env); Now, if you only want to match IU's on filters, you just do this. IQuery<IInstallableUnit> query = QueryUtil.createMatchQuery("$0 ~= filter", envIU);
Cool, thanks Thomas. I've modified it slightly to suit my needs and it works. For reference, this is what I've done: IQuery<IInstallableUnit> groupQuery = QueryUtil.createIUGroupQuery(); IQuery<IInstallableUnit> filterQuery = QueryUtil.createMatchQuery("filter == null || $0 ~= filter", envIU); IQuery<IInstallableUnit> query = QueryUtil.createCompoundQuery(groupQuery, filterQuery, true);
Created attachment 178520 [details] patch Here is a patch which adds a new checkbox to the Available IUs page and filters out the results based on the profile's environment settings, if applicable.
Comment on attachment 178520 [details] patch Patch isn't quite right, doesn't handle the case where we are viewing via categories.
Created attachment 178525 [details] updated patch Here is an updated patch which works whether we are viewing by category, or not.
Susan, do you mind reviewing this one for me? I think it is pretty straight forward but I'm not a UI guy. No hurry to get it in for the milestone next week. I'll mark it M3 so we don't lose track of it.
Bumping to M4 since I'm going to be on holidays. Susan, if you have time to review feel free to release for M3.
Created attachment 184467 [details] update site for testing
Looks good. I also tested on the helios repository, where it filtered out the Linux-specific contributions from Linux tools project.
Patch released to HEAD.