use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class MarketplaceDiscoveryStrategy method featured.
public void featured(IProgressMonitor monitor, final IMarket market, final ICategory category) throws CoreException {
SubMonitor progress = SubMonitor.convert(monitor, Messages.MarketplaceDiscoveryStrategy_searchingMarketplace, 1001);
try {
MarketplaceCategory catalogCategory = findMarketplaceCategory(progress.newChild(1));
catalogCategory.setContents(Contents.FEATURED);
ISearchResult result = marketplaceService.featured(market, category, progress.newChild(500));
handleSearchResult(catalogCategory, result, progress.newChild(500));
maybeAddCatalogItem(catalogCategory);
} finally {
monitor.done();
}
}
use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class MarketplaceDiscoveryStrategy method popular.
public void popular(IProgressMonitor monitor) throws CoreException {
SubMonitor progress = SubMonitor.convert(monitor, Messages.MarketplaceDiscoveryStrategy_searchingMarketplace, 1001);
try {
MarketplaceCategory catalogCategory = findMarketplaceCategory(progress.newChild(1));
catalogCategory.setContents(Contents.POPULAR);
ISearchResult result = marketplaceService.popular(progress.newChild(500));
handleSearchResult(catalogCategory, result, progress.newChild(500));
maybeAddCatalogItem(catalogCategory);
} finally {
monitor.done();
}
}
use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class MarketplaceDiscoveryStrategy method performDiscovery.
@Override
public void performDiscovery(IProgressMonitor monitor) throws CoreException {
SubMonitor progress = SubMonitor.convert(monitor, Messages.MarketplaceDiscoveryStrategy_loadingMarketplace, 3000);
try {
MarketplaceCategory catalogCategory = findMarketplaceCategory(progress.newChild(1000));
handleDiscoveryCategory(catalogCategory);
ISearchResult discoveryResult = doPerformDiscovery(progress.newChild(1000));
handleSearchResult(catalogCategory, discoveryResult, progress.newChild(1000));
maybeAddCatalogItem(catalogCategory);
} finally {
monitor.done();
}
}
use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class MarketplaceDiscoveryStrategy method recent.
public void recent(IProgressMonitor monitor) throws CoreException {
SubMonitor progress = SubMonitor.convert(monitor, Messages.MarketplaceDiscoveryStrategy_searchingMarketplace, 1001);
try {
MarketplaceCategory catalogCategory = findMarketplaceCategory(progress.newChild(1));
catalogCategory.setContents(Contents.RECENT);
ISearchResult result = marketplaceService.recent(progress.newChild(500));
handleSearchResult(catalogCategory, result, progress.newChild(500));
maybeAddCatalogItem(catalogCategory);
} finally {
monitor.done();
}
}
use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class MarketplaceDiscoveryStrategy method related.
public void related(IProgressMonitor monitor) throws CoreException {
SubMonitor progress = SubMonitor.convert(monitor, Messages.MarketplaceDiscoveryStrategy_searchingMarketplace, 801);
try {
MarketplaceCategory catalogCategory = findMarketplaceCategory(progress.newChild(1));
catalogCategory.setContents(Contents.RELATED);
SearchResult installed = computeInstalled(progress.newChild(200));
if (!monitor.isCanceled()) {
ISearchResult result = marketplaceService.related(installed.getNodes(), progress.newChild(300));
handleSearchResult(catalogCategory, result, progress.newChild(300));
maybeAddCatalogItem(catalogCategory);
}
} finally {
monitor.done();
}
}
Aggregations