Search in sources :

Example 11 with IQuery

use of org.eclipse.equinox.p2.query.IQuery in project archi by archimatetool.

the class P2Handler method getInstalledFeatures.

List<IInstallableUnit> getInstalledFeatures() throws ProvisionException {
    IProfile profile = getDefaultProfile();
    ArrayList<IInstallableUnit> list = new ArrayList<IInstallableUnit>();
    IQuery<IInstallableUnit> query = QueryUtil.createIUGroupQuery();
    IQueryResult<IInstallableUnit> queryResult = profile.query(query, null);
    for (IInstallableUnit feature : queryResult) {
        if (!isInternalFeature(feature)) {
            list.add(feature);
        }
    }
    return list;
}
Also used : ArrayList(java.util.ArrayList) IInstallableUnit(org.eclipse.equinox.p2.metadata.IInstallableUnit) IProfile(org.eclipse.equinox.p2.engine.IProfile)

Aggregations

IInstallableUnit (org.eclipse.equinox.p2.metadata.IInstallableUnit)11 ArrayList (java.util.ArrayList)5 IMetadataRepository (org.eclipse.equinox.p2.repository.metadata.IMetadataRepository)5 URI (java.net.URI)2 CoreException (org.eclipse.core.runtime.CoreException)2 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)2 ProvisionException (org.eclipse.equinox.p2.core.ProvisionException)2 IProfile (org.eclipse.equinox.p2.engine.IProfile)2 IQuery (org.eclipse.equinox.p2.query.IQuery)2 IMetadataRepositoryManager (org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager)2 URISyntaxException (java.net.URISyntaxException)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 MultiStatus (org.eclipse.core.runtime.MultiStatus)1 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)1 OperationCanceledException (org.eclipse.core.runtime.OperationCanceledException)1 ConcurrentTaskManager (org.eclipse.epp.internal.mpc.ui.util.ConcurrentTaskManager)1 INode (org.eclipse.epp.mpc.core.model.INode)1 LocalMetadataRepository (org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository)1