use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class DefaultMarketplaceServiceTest method recent.
@Test
@org.junit.experimental.categories.Category(RemoteTests.class)
public void recent() throws CoreException {
ISearchResult result = marketplaceService.recent(new NullProgressMonitor());
assertSearchResultSanity(result);
}
use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class DefaultMarketplaceServiceTest method search.
private ISearchResult search(String marketName, String categoryName, String queryText) throws CoreException {
IMarket toolsMarket = marketName == null ? null : findMarket(marketName);
ICategory mylynCategory = categoryName == null ? null : findCategory(toolsMarket, categoryName);
ISearchResult result = marketplaceService.search(toolsMarket, mylynCategory, queryText, new NullProgressMonitor());
return result;
}
use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class DefaultMarketplaceServiceTest method popular.
@Test
@org.junit.experimental.categories.Category(RemoteTests.class)
public void popular() throws CoreException {
ISearchResult result = marketplaceService.popular(new NullProgressMonitor());
assertSearchResultSanity(result);
}
use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class SolutionCompatibilityFilterTest method searchForNode.
protected INode searchForNode() throws CoreException {
ISearchResult searchResult = marketplaceService.search(null, null, solution.query(), new NullProgressMonitor());
assertSearchResultSanity(searchResult);
List<? extends INode> nodes = searchResult.getNodes();
INode foundNode = null;
for (INode node : nodes) {
if ((solution.id() != null && solution.id().equals(node.getId())) || (solution.url() != null && solution.url().equals(node.getUrl()))) {
foundNode = node;
break;
}
}
return foundNode;
}
use of org.eclipse.epp.mpc.core.model.ISearchResult in project epp.mpc by eclipse.
the class MarketplaceDiscoveryStrategy method tagged.
public void tagged(String tag, IProgressMonitor monitor) throws CoreException {
final int totalWork = 1000;
SubMonitor progress = SubMonitor.convert(monitor, Messages.MarketplaceDiscoveryStrategy_searchingMarketplace, totalWork);
try {
ISearchResult result;
MarketplaceCategory catalogCategory = findMarketplaceCategory(progress.newChild(1));
catalogCategory.setContents(Contents.QUERY);
// resolve market and category if necessary
result = marketplaceService.tagged(tag, progress.newChild(500));
handleSearchResult(catalogCategory, result, progress.newChild(500));
if (result.getNodes().isEmpty()) {
catalogCategory.setMatchCount(0);
addCatalogItem(catalogCategory);
}
} finally {
progress.done();
}
}
Aggregations