task = new TaskAdapter() {
public IStatus run(IProgressMonitor monitor) {
List<ISearchCondition> conditions = new ArrayList<ISearchCondition>();
ISearchField field1 = factory.createSearchField(INews.STATE, INews.class.getName());
conditions.add(factory.createSearchCondition(field1, SearchSpecifier.IS, EnumSet.of(INews.State.NEW, INews.State.UNREAD, INews.State.UPDATED)));
ISearchField field4 = factory.createSearchField(INews.HAS_ATTACHMENTS, INews.class.getName());
conditions.add(factory.createSearchCondition(field4, SearchSpecifier.IS, true));
results[0] = fModelSearch.searchNews(conditions, false).size();