|
14 | 14 | *******************************************************************************/ |
15 | 15 | package org.eclipse.equinox.internal.p2.ui; |
16 | 16 |
|
17 | | -import java.net.URI; |
18 | 17 | import java.util.*; |
19 | 18 | import org.eclipse.equinox.internal.p2.metadata.InstallableUnit; |
20 | 19 | import org.eclipse.equinox.internal.p2.ui.model.*; |
@@ -100,7 +99,7 @@ public ElementQueryDescriptor getQueryDescriptor(final QueriedElement element) { |
100 | 99 | switch (queryType) { |
101 | 100 | case ARTIFACT_REPOS : |
102 | 101 | queryable = new QueryableArtifactRepositoryManager(ui, false).locationsQueriable(); |
103 | | - return new ElementQueryDescriptor(queryable, new RepositoryLocationQuery(), new Collector<URI>(), new ArtifactRepositoryElementWrapper(null, element)); |
| 102 | + return new ElementQueryDescriptor(queryable, new RepositoryLocationQuery(), new Collector<>(), new ArtifactRepositoryElementWrapper(null, element)); |
104 | 103 |
|
105 | 104 | case AVAILABLE_IUS : |
106 | 105 | // Things get more complicated if the user wants to filter out installed items. |
@@ -206,20 +205,20 @@ public ElementQueryDescriptor getQueryDescriptor(final QueriedElement element) { |
206 | 205 | IQuery<IInstallableUnit> meetsAnyRequirementQuery = QueryUtil.createMatchQuery(factory.or(requirementExpressions)); |
207 | 206 | IQuery<IInstallableUnit> visibleAsAvailableQuery = policy.getVisibleAvailableIUQuery(); |
208 | 207 | IQuery<IInstallableUnit> createCompoundQuery = QueryUtil.createCompoundQuery(visibleAsAvailableQuery, meetsAnyRequirementQuery, true); |
209 | | - return new ElementQueryDescriptor(queryable, createCompoundQuery, new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(queryable, element)); |
| 208 | + return new ElementQueryDescriptor(queryable, createCompoundQuery, new Collector<>(), new InstalledIUElementWrapper(queryable, element)); |
210 | 209 | } |
211 | 210 | profile = ProvUI.getAdapter(element, IProfile.class); |
212 | 211 | if (profile == null) |
213 | 212 | return null; |
214 | | - return new ElementQueryDescriptor(profile, policy.getVisibleInstalledIUQuery(), new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(profile, element)); |
| 213 | + return new ElementQueryDescriptor(profile, policy.getVisibleInstalledIUQuery(), new Collector<>(), new InstalledIUElementWrapper(profile, element)); |
215 | 214 |
|
216 | 215 | case METADATA_REPOS : |
217 | 216 | if (element instanceof MetadataRepositories) { |
218 | 217 | if (queryable == null) { |
219 | 218 | queryable = new QueryableMetadataRepositoryManager(ui, ((MetadataRepositories) element).getIncludeDisabledRepositories()).locationsQueriable(); |
220 | 219 | element.setQueryable(queryable); |
221 | 220 | } |
222 | | - return new ElementQueryDescriptor(element.getQueryable(), new RepositoryLocationQuery(), new Collector<URI>(), new MetadataRepositoryElementWrapper(null, element)); |
| 221 | + return new ElementQueryDescriptor(element.getQueryable(), new RepositoryLocationQuery(), new Collector<>(), new MetadataRepositoryElementWrapper(null, element)); |
223 | 222 | } |
224 | 223 | return null; |
225 | 224 |
|
|
0 commit comments