Search in sources :

Example 6 with MarketplaceDiscoveryStrategy

use of org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceDiscoveryStrategy in project epp.mpc by eclipse.

the class MarketplaceWizard method initializeCatalog.

void initializeCatalog() {
    final MarketplaceCatalog catalog = getCatalog();
    synchronized (catalog) {
        List<AbstractDiscoveryStrategy> discoveryStrategies = catalog.getDiscoveryStrategies();
        for (AbstractDiscoveryStrategy strategy : discoveryStrategies) {
            strategy.dispose();
        }
        discoveryStrategies.clear();
        if (getConfiguration().getCatalogDescriptor() != null) {
            MarketplaceDiscoveryStrategy discoveryStrategy = new MarketplaceDiscoveryStrategy(getConfiguration().getCatalogDescriptor());
            discoveryStrategy.setShellProvider(this);
            discoveryStrategies.add(discoveryStrategy);
        }
    }
}
Also used : MarketplaceDiscoveryStrategy(org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceDiscoveryStrategy) AbstractDiscoveryStrategy(org.eclipse.equinox.internal.p2.discovery.AbstractDiscoveryStrategy) MarketplaceCatalog(org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceCatalog)

Example 7 with MarketplaceDiscoveryStrategy

use of org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceDiscoveryStrategy in project epp.mpc by eclipse.

the class MarketplaceWizard method findMarketplaceDiscoveryStrategy.

protected MarketplaceDiscoveryStrategy findMarketplaceDiscoveryStrategy() {
    MarketplaceDiscoveryStrategy marketplaceStrategy = null;
    List<AbstractDiscoveryStrategy> discoveryStrategies = getCatalog().getDiscoveryStrategies();
    for (AbstractDiscoveryStrategy strategy : discoveryStrategies) {
        if (strategy instanceof MarketplaceDiscoveryStrategy) {
            marketplaceStrategy = (MarketplaceDiscoveryStrategy) strategy;
            break;
        }
    }
    return marketplaceStrategy;
}
Also used : MarketplaceDiscoveryStrategy(org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceDiscoveryStrategy) AbstractDiscoveryStrategy(org.eclipse.equinox.internal.p2.discovery.AbstractDiscoveryStrategy)

Aggregations

MarketplaceDiscoveryStrategy (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceDiscoveryStrategy)7 MarketplaceCatalog (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceCatalog)5 URL (java.net.URL)3 CatalogDescriptor (org.eclipse.epp.mpc.ui.CatalogDescriptor)3 AbstractDiscoveryStrategy (org.eclipse.equinox.internal.p2.discovery.AbstractDiscoveryStrategy)3 IStatus (org.eclipse.core.runtime.IStatus)2 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 MarketplaceCategory (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceCategory)2 IMarketplaceService (org.eclipse.epp.mpc.core.service.IMarketplaceService)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 SearchResult (org.eclipse.epp.internal.mpc.core.model.SearchResult)1 DefaultMarketplaceService (org.eclipse.epp.internal.mpc.core.service.DefaultMarketplaceService)1 MarketplaceNodeCatalogItem (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceNodeCatalogItem)1 MarketplaceNodeInstallableUnitItem (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceNodeInstallableUnitItem)1 InstallProfile (org.eclipse.epp.internal.mpc.ui.wizards.InstallProfile)1 SelectionModel (org.eclipse.epp.internal.mpc.ui.wizards.SelectionModel)1