Search in sources :

Example 1 with SelectionModel

use of org.eclipse.epp.internal.mpc.ui.wizards.SelectionModel in project epp.mpc by eclipse.

the class SelectionModelStateSerializerTest method setUp.

@Before
public void setUp() throws Exception {
    CatalogDescriptor catalogDescriptor = new CatalogDescriptor(new URL("http://marketplace.eclipse.org"), "Eclipse.org Marketplace");
    discoveryStrategy = new MarketplaceDiscoveryStrategy(catalogDescriptor) {

        @Override
        public IMarketplaceService createMarketplaceService() {
            DefaultMarketplaceService marketplaceService = new DefaultMarketplaceService(catalogDescriptor.getUrl());
            Map<String, String> requestMetaParameters = ServiceLocator.computeDefaultRequestMetaParameters();
            marketplaceService.setRequestMetaParameters(requestMetaParameters);
            return marketplaceService;
        }
    };
    catalog = new MarketplaceCatalog();
    catalog.getDiscoveryStrategies().add(discoveryStrategy);
    selectionModel = new SelectionModel(new InstallProfile() {

        public Set<String> getInstalledFeatures() {
            return Collections.emptySet();
        }
    });
}
Also used : MarketplaceDiscoveryStrategy(org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceDiscoveryStrategy) DefaultMarketplaceService(org.eclipse.epp.internal.mpc.core.service.DefaultMarketplaceService) SelectionModel(org.eclipse.epp.internal.mpc.ui.wizards.SelectionModel) MarketplaceCatalog(org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceCatalog) IMarketplaceService(org.eclipse.epp.mpc.core.service.IMarketplaceService) InstallProfile(org.eclipse.epp.internal.mpc.ui.wizards.InstallProfile) Map(java.util.Map) URL(java.net.URL) CatalogDescriptor(org.eclipse.epp.mpc.ui.CatalogDescriptor) Before(org.junit.Before)

Aggregations

URL (java.net.URL)1 Map (java.util.Map)1 DefaultMarketplaceService (org.eclipse.epp.internal.mpc.core.service.DefaultMarketplaceService)1 MarketplaceCatalog (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceCatalog)1 MarketplaceDiscoveryStrategy (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceDiscoveryStrategy)1 InstallProfile (org.eclipse.epp.internal.mpc.ui.wizards.InstallProfile)1 SelectionModel (org.eclipse.epp.internal.mpc.ui.wizards.SelectionModel)1 IMarketplaceService (org.eclipse.epp.mpc.core.service.IMarketplaceService)1 CatalogDescriptor (org.eclipse.epp.mpc.ui.CatalogDescriptor)1 Before (org.junit.Before)1