• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SearchResultEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.search.ui.SearchResultEvent的典型用法代码示例。如果您正苦于以下问题:Java SearchResultEvent类的具体用法?Java SearchResultEvent怎么用?Java SearchResultEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SearchResultEvent类属于org.eclipse.search.ui包,在下文中一共展示了SearchResultEvent类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: searchResultChanged

import org.eclipse.search.ui.SearchResultEvent; //导入依赖的package包/类
@Override
public void searchResultChanged(final SearchResultEvent e) {
  if (e instanceof Added) {
    addReference(((Added) e).getReferenceDescription());
    if (!isUIUpdateScheduled) {
      isUIUpdateScheduled = true;
      new UIUpdater().schedule();
    }
  } else if (e instanceof Reset) {
    PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
      @Override
      public void run() {
        synchronized (viewer) {
          viewer.remove(viewer.getInput(), Iterables.toArray(rootNodes.values(), ReferenceSearchViewTreeNode.class));
          rootNodes.clear();
        }
        viewer.refresh();
        viewer.expandToLevel(1);
      }
    });
  }
}
 
开发者ID:dsldevkit,项目名称:dsl-devkit,代码行数:23,代码来源:FastReferenceSearchResultContentProvider.java


示例2: searchResultChanged

import org.eclipse.search.ui.SearchResultEvent; //导入依赖的package包/类
@Override
public void searchResultChanged(SearchResultEvent event) {
	if (event instanceof ModelSearchResultEvent) {
		Display.getDefault().asyncExec(new Runnable() {
			@Override
			public void run() {
				IFile f = ((ModelSearchResultEvent) event).getFile();
				files.add(f);
				IFile[] array = files.stream().distinct().toArray(IFile[]::new);
				viewer.setInput(array);
			}
		});
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:15,代码来源:ModelSearchResultPage.java


示例3: fireEvent

import org.eclipse.search.ui.SearchResultEvent; //导入依赖的package包/类
void fireEvent(SearchResultEvent searchResultEvent) {
	synchronized (listeners) {
		for (ISearchResultListener listener : listeners) {
			listener.searchResultChanged(searchResultEvent);
		}
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:8,代码来源:ReferenceSearchResult.java


示例4: searchResultChanged

import org.eclipse.search.ui.SearchResultEvent; //导入依赖的package包/类
public void searchResultChanged(final SearchResultEvent e) {
	synchronized (batchedSearchResultEvents) {
		batchedSearchResultEvents.add(e);
	}
	if (!isUIUpdateScheduled) {
		isUIUpdateScheduled = true;
		new UIUpdater().schedule();
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:10,代码来源:ReferenceSearchResultContentProvider.java


示例5: runInUIThread

import org.eclipse.search.ui.SearchResultEvent; //导入依赖的package包/类
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
	isUIUpdateScheduled = false;
	List<SearchResultEvent> events;
	synchronized (batchedSearchResultEvents) {
		events = Lists.newArrayList(batchedSearchResultEvents);
		batchedSearchResultEvents.clear();
	}
	SubMonitor progress = SubMonitor.convert(monitor, events.size());
	for (SearchResultEvent event : events) {
		if (event instanceof Added) {
			addReference(((Added) event).getReferenceDescription(), true);
		} else if (event instanceof Reset) {
			if (rootNodes != null && !rootNodes.isEmpty()) {
				synchronized (viewer) {
					viewer.remove(viewer.getInput(),
							Iterables.toArray(rootNodes, ReferenceSearchViewTreeNode.class));
					rootNodes = null;
				}
			}
		}
		progress.worked(1);
	}
	viewer.refresh();
	viewer.expandToLevel(1);
	return Status.OK_STATUS;
}
 
开发者ID:cplutte,项目名称:bts,代码行数:28,代码来源:ReferenceSearchResultContentProvider.java


示例6: fireChange

import org.eclipse.search.ui.SearchResultEvent; //导入依赖的package包/类
/**
 * Send the given <code>SearchResultEvent</code> to all registered search result listeners.
 *
 * @param e the event to be sent
 * @see ISearchResultListener
 */
protected void fireChange(SearchResultEvent e) {
  HashSet copiedListeners = new HashSet();
  synchronized (fListeners) {
    copiedListeners.addAll(fListeners);
  }
  Iterator listeners = copiedListeners.iterator();
  while (listeners.hasNext()) {
    ((ISearchResultListener) listeners.next()).searchResultChanged(e);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:17,代码来源:AbstractTextSearchResult.java


示例7: searchResultChanged

import org.eclipse.search.ui.SearchResultEvent; //导入依赖的package包/类
@Override
public void searchResultChanged(final SearchResultEvent e)
{
  final ISearchResult result = e.getSearchResult();
  if (result instanceof IJiveSearchResult)
  {
    if (e instanceof MatchEvent)
    {
      final MatchEvent matchEvent = (MatchEvent) e;
      switch (matchEvent.getKind())
      {
        case MatchEvent.ADDED:
          addSearchResults(matchEvent.getMatches());
          break;
        case MatchEvent.REMOVED:
          if (searchResultMap.size() > 1)
          {
            removeSearchResults(matchEvent.getMatches());
            focusResults();
          }
          else
          {
            unfocusResults();
          }
          break;
      }
    }
    else if (e instanceof RemoveAllEvent)
    {
      unfocusResults();
    }
    forceUpdate();
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:35,代码来源:SequenceDiagramEditPart.java


示例8: notifyListeners

import org.eclipse.search.ui.SearchResultEvent; //导入依赖的package包/类
private void notifyListeners(IFile file) {
	SearchResultEvent event = new ModelSearchResultEvent(this, file);

	for (Object listener : fListeners.getListeners())
		((ISearchResultListener) listener).searchResultChanged(event);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:7,代码来源:ModelSearchResult.java


示例9: searchResultChanged

import org.eclipse.search.ui.SearchResultEvent; //导入依赖的package包/类
@Override
public void searchResultChanged(SearchResultEvent event) {
	if (viewer != null) {
		viewer.refresh();
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:7,代码来源:PlanSearchContentProvider.java



注:本文中的org.eclipse.search.ui.SearchResultEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Bounds类代码示例发布时间:2022-05-22
下一篇:
Java IsolatedContext类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap