Search in sources :

Example 11 with IMarketplaceService

use of org.eclipse.epp.mpc.core.service.IMarketplaceService in project epp.mpc by eclipse.

the class DiscoverFileSupportJob method run.

@Override
protected IStatus run(IProgressMonitor monitor) {
    BundleContext bundleContext = MarketplaceClientUiPlugin.getBundleContext();
    ServiceReference<IMarketplaceServiceLocator> locatorReference = bundleContext.getServiceReference(IMarketplaceServiceLocator.class);
    IMarketplaceServiceLocator locator = bundleContext.getService(locatorReference);
    IMarketplaceService marketplaceService = locator.getDefaultMarketplaceService();
    try {
        return run(marketplaceService, monitor);
    } finally {
        bundleContext.ungetService(locatorReference);
    }
}
Also used : IMarketplaceService(org.eclipse.epp.mpc.core.service.IMarketplaceService) IMarketplaceServiceLocator(org.eclipse.epp.mpc.core.service.IMarketplaceServiceLocator) BundleContext(org.osgi.framework.BundleContext)

Aggregations

IMarketplaceService (org.eclipse.epp.mpc.core.service.IMarketplaceService)11 URL (java.net.URL)5 DefaultMarketplaceService (org.eclipse.epp.internal.mpc.core.service.DefaultMarketplaceService)3 INode (org.eclipse.epp.mpc.core.model.INode)3 CoreException (org.eclipse.core.runtime.CoreException)2 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)2 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)2 Node (org.eclipse.epp.internal.mpc.core.model.Node)2 MarketplaceDiscoveryStrategy (org.eclipse.epp.internal.mpc.ui.catalog.MarketplaceDiscoveryStrategy)2 ISearchResult (org.eclipse.epp.mpc.core.model.ISearchResult)2 IMarketplaceServiceLocator (org.eclipse.epp.mpc.core.service.IMarketplaceServiceLocator)2 IUserFavoritesService (org.eclipse.epp.mpc.core.service.IUserFavoritesService)2 BundleContext (org.osgi.framework.BundleContext)2 MalformedURLException (java.net.MalformedURLException)1 Map (java.util.Map)1 IStatus (org.eclipse.core.runtime.IStatus)1 Status (org.eclipse.core.runtime.Status)1 Job (org.eclipse.core.runtime.jobs.Job)1 CachingMarketplaceService (org.eclipse.epp.internal.mpc.core.service.CachingMarketplaceService)1 UserFavoritesService (org.eclipse.epp.internal.mpc.core.service.UserFavoritesService)1