当前位置: 首页>>代码示例>>Java>>正文


Java ISearchResult类代码示例

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


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

示例1: setInput

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
@Override
public void setInput(final ISearchResult newSearch, final Object viewState)
{
  super.setInput(newSearch, viewState);
  if (newSearch != null)
  {
    if (getLayout() == AbstractTextSearchViewPage.FLAG_LAYOUT_FLAT)
    {
      final IJiveSearchResult result = (IJiveSearchResult) newSearch;
      final IJiveSearchQuery query = result.getQuery();
      resultType = query.getResultType();
      setLayout(AbstractTextSearchViewPage.FLAG_LAYOUT_TREE);
      setLayout(AbstractTextSearchViewPage.FLAG_LAYOUT_FLAT);
    }
    // Display the sequence diagram and notify it of changing results
    final IJiveGraphicalView diagram = (IJiveGraphicalView) showView(JiveUIPlugin.ID_SEQUENCE_DIAGRAM_VIEW);
    final IJiveDebugTarget activeTarget = JiveSearchResultPage.activeTarget();
    if (activeTarget != null)
    {
      final GraphicalViewer viewer = diagram.getViewer();
      final IQueryListener contents = (IQueryListener) viewer.getContents();
      contents.queryFinished(newSearch.getQuery());
    }
  }
}
 
开发者ID:UBPL,项目名称:jive,代码行数:26,代码来源:JiveSearchResultPage.java

示例2: setInput

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
@Override
public void setInput(ISearchResult search, Object uiState) {
	if (search != null) {
		search.addListener(this);
	}
	files = new ArrayList<IFile>();
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:8,代码来源:ModelSearchResultPage.java

示例3: getSearchResult

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
@Override
public ISearchResult getSearchResult() {
	if (result == null) {
		result = new EditorConfigSearchResult(this);
	}
	return result;
}
 
开发者ID:angelozerr,项目名称:ec4e,代码行数:8,代码来源:EditorConfigSearchQuery.java

示例4: getSearchResult

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
@Override
public ISearchResult getSearchResult() {
	if (searchResult == null) {
		TypeScriptSearchResult result = new TypeScriptSearchResult(this);
		// new SearchResultUpdater(result);
		searchResult = result;
	}
	return searchResult;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:10,代码来源:TypeScriptSearchQuery.java

示例5: getSearchResult

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
/**
 * @see org.eclipse.search.ui.ISearchQuery#getSearchResult()
 */
public ISearchResult getSearchResult() {
    if (result == null) {
        result = new UMLInverseReferenceModelSearchResult(this);
        return result;
    }
    return result;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:11,代码来源:UMLInverseReferenceModelSearchQuery.java

示例6: getSearchResult

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
/**
 * @see org.eclipse.search.ui.ISearchQuery#getSearchResult()
 */
public ISearchResult getSearchResult() {
    if (result == null) {
        result = new UMLModelSearchResult(this);
        return result;
    }
    return result;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:11,代码来源:UMLModelSearchQuery.java

示例7: setInput

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
public void setInput(ISearchResult newSearchResult, Object uiState) {
	synchronized (viewer) {
		this.searchResult = newSearchResult;
		if (searchResult != null) {
			viewer.setInput(newSearchResult);
			if (uiState instanceof ISelection) {
				viewer.setSelection((ISelection) uiState);
			}
		}
		part.updateLabel();
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:13,代码来源:ReferenceSearchViewPage.java

示例8: getLabel

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
@Override
public String getLabel() {
    final ISearchResult result = getInput();
    if(result != null) {
        return result.getLabel();
    }
    return "";
}
 
开发者ID:insweat,项目名称:hssd,代码行数:9,代码来源:AbstractSearchResultPage.java

示例9: getSearchResult

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
@Override
public ISearchResult getSearchResult() {
    if(result == null) {
        return getEmptyResult();
    }
    return result;
}
 
开发者ID:insweat,项目名称:hssd,代码行数:8,代码来源:AbstractSearchQuery.java

示例10: testFind

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
@Test
public void testFind() throws Exception {
  JavaSearchQuery query =
      SearchTestHelper.runMethodRefQuery("junit.framework.Test", "countTestCases", new String[0]);
  ISearchResult result = query.getSearchResult();
  JavaSearchResult javaResult = ((JavaSearchResult) result);
  Assertions.assertThat(javaResult.getElements()).hasSize(9);
}
 
开发者ID:eclipse,项目名称:che,代码行数:9,代码来源:FindReferencesTest.java

示例11: testFind2

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
@Test
public void testFind2() throws Exception {
  IPackageFragmentRoot root =
      ((JavaProject) JUnitSourceSetup.getProject())
          .getPackageFragmentRoot(new Path(JUnitSourceSetup.SRC_CONTAINER));
  IPackageFragment packageFragment = root.createPackageFragment("che", true, null);
  StringBuilder a = new StringBuilder();
  a.append("package che;\n");
  a.append("public class A{}\n");
  packageFragment.createCompilationUnit("A.java", a.toString(), true, null);
  StringBuilder b = new StringBuilder();
  b.append("package che;\n");
  b.append("import java.util.Comparator;\n");
  b.append("public class B extends A implements Comparator<A>{\n");
  b.append("   @Override\n");
  b.append("   public int compare(A o1, A o2) {\n");
  b.append("       A bb = null;\n");
  b.append("       return 0;\n");
  b.append("   }\n");
  b.append("}\n");
  packageFragment.createCompilationUnit("B.java", b.toString(), true, null);

  JavaSearchQuery query = SearchTestHelper.runTypeRefQuery("che.A");
  ISearchResult result = query.getSearchResult();
  JavaSearchResult javaResult = ((JavaSearchResult) result);
  Assertions.assertThat(javaResult.getElements()).hasSize(2);
}
 
开发者ID:eclipse,项目名称:che,代码行数:28,代码来源:FindReferencesTest.java

示例12: getSearchResult

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
public ISearchResult getSearchResult() {
  if (fResult == null) {
    JavaSearchResult result = new JavaSearchResult(this);
    new SearchResultUpdater(result);
    fResult = result;
  }
  return fResult;
}
 
开发者ID:eclipse,项目名称:che,代码行数:9,代码来源:JavaSearchQuery.java

示例13: getSearchResult

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
public ISearchResult getSearchResult() {
	if (fResult == null) {
		JavaSearchResult result= new JavaSearchResult(this);
		new SearchResultUpdater(result);
		fResult= result;
	}
	return fResult;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:JavaSearchQuery.java

示例14: setInput

import org.eclipse.search.ui.ISearchResult; //导入依赖的package包/类
@Override
public void setInput(final ISearchResult newSearch, final Object state) {
    super.setInput(newSearch, state);
    clear();
    if (newSearch != null) {
        elementsChanged(((AbstractTextSearchResult) newSearch).getElements());
    }
}
 
开发者ID:GRA-UML,项目名称:tool,代码行数:9,代码来源:ReferenceLibrarySearchResultPage.java

示例15: searchResultChanged

import org.eclipse.search.ui.ISearchResult; //导入依赖的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


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