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


Java ISearchQuery类代码示例

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


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

示例1: runSearchInForeground

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public IStatus runSearchInForeground(
    IRunnableContext context, final ISearchQuery query, Object view) {
  if (isQueryRunning(query)) {
    return Status.CANCEL_STATUS;
  }

  //		// prepare view
  //		if (view == null) {
  //			getSearchViewManager().activateSearchView(true);
  //		} else {
  //			getSearchViewManager().activateSearchView(view);
  //		}

  addQuery(query);

  SearchJobRecord sjr = new SearchJobRecord(query);
  fSearchJobs.put(query, sjr);
  //
  //		if (context == null)
  //			context= new ProgressMonitorDialog(null);

  return doRunSearchInForeground(sjr, context);
}
 
开发者ID:eclipse,项目名称:che,代码行数:24,代码来源:InternalSearchUI.java

示例2: queryFinished

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
@Override
public void queryFinished(final ISearchQuery query)
{
  unfocusResults();
  if (query instanceof IJiveSearchQuery)
  {
    // update search results
    final IJiveSearchResult jiveResult = (IJiveSearchResult) query.getSearchResult();
    for (final Object element : jiveResult.getElements())
    {
      addSearchResults(jiveResult.getMatches(element));
    }
    // focus the sequence diagram on the current results
    focusResults();
    query.getSearchResult().addListener(this);
    // TODO Keep track of result in order to remove listener in case the view is closed
  }
  forceUpdate();
}
 
开发者ID:UBPL,项目名称:jive,代码行数:20,代码来源:SequenceDiagramEditPart.java

示例3: newQuery

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
/**
 * newQuery
 * 
 * @return ISearchQuery
 */
private ISearchQuery newQuery() {
    String projectNames[] = container.getSelectedProjectNames();

    UMLModelSearch searcher = new UMLModelSearch();
    IProject projectArray[] = searcher.findUMLDesignProjects(projectNames);

    UMLModelSearchPattern pattern = getPatternData();
    pattern.setObjectScope(checkboxViewer.getCheckedElements());

    ISearchQuery query = new UMLModelSearchQuery(projectArray, searcher, pattern);

    return query;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:19,代码来源:UMLModelSearchPage.java

示例4: run

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
@Override
public void run(IAction action) {
    if(namedElement == null) {
        return;
    }
    UMLInverseReferenceModelSearch searcher = new UMLInverseReferenceModelSearch();

    UMLInverseReferenceModelSearchPattern pattern = new UMLInverseReferenceModelSearchPattern((NamedElement)namedElement);

    ISearchQuery query = new UMLInverseReferenceModelSearchQuery(searcher, pattern);

    NewSearchUI.runQueryInBackground(query);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:14,代码来源:SearchOfInverseReference.java

示例5: queryFinished

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
@Override
public void queryFinished(ISearchQuery query) {
    final ISearchQuery q = query;
    final UIJob job = new UIJob("UpdateSearchResultView") {
        @Override
        public IStatus runInUIThread(IProgressMonitor monitor) {
            setInput(q.getSearchResult(), null);
            getViewPart().updateLabel();
            return Status.OK_STATUS;
        }
    };

    job.setSystem(true);
    job.schedule();
}
 
开发者ID:insweat,项目名称:hssd,代码行数:16,代码来源:EntrySearchResultPage.java

示例6: addQuery

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void addQuery(ISearchQuery query) {
  synchronized (this) {
    if (fQueries.contains(query)) return;
    fQueries.add(0, query);
  }
  fireAdded(query);
}
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:QueryManager.java

示例7: fireAdded

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void fireAdded(ISearchQuery query) {
  Set copiedListeners = new HashSet();
  synchronized (fListeners) {
    copiedListeners.addAll(fListeners);
  }
  Iterator listeners = copiedListeners.iterator();
  while (listeners.hasNext()) {
    IQueryListener l = (IQueryListener) listeners.next();
    l.queryAdded(query);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:QueryManager.java

示例8: fireRemoved

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void fireRemoved(ISearchQuery query) {
  Set copiedListeners = new HashSet();
  synchronized (fListeners) {
    copiedListeners.addAll(fListeners);
  }
  Iterator listeners = copiedListeners.iterator();
  while (listeners.hasNext()) {
    IQueryListener l = (IQueryListener) listeners.next();
    l.queryRemoved(query);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:QueryManager.java

示例9: fireStarting

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void fireStarting(ISearchQuery query) {
  Set copiedListeners = new HashSet();
  synchronized (fListeners) {
    copiedListeners.addAll(fListeners);
  }
  Iterator listeners = copiedListeners.iterator();
  while (listeners.hasNext()) {
    IQueryListener l = (IQueryListener) listeners.next();
    l.queryStarting(query);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:QueryManager.java

示例10: fireFinished

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void fireFinished(ISearchQuery query) {
  Set copiedListeners = new HashSet();
  synchronized (fListeners) {
    copiedListeners.addAll(fListeners);
  }
  Iterator listeners = copiedListeners.iterator();
  while (listeners.hasNext()) {
    IQueryListener l = (IQueryListener) listeners.next();
    l.queryFinished(query);
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:QueryManager.java

示例11: removeAll

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void removeAll() {
  synchronized (this) {
    List old = fQueries;
    fQueries = new LinkedList();
    Iterator iter = old.iterator();
    while (iter.hasNext()) {
      ISearchQuery element = (ISearchQuery) iter.next();
      fireRemoved(element);
    }
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:12,代码来源:QueryManager.java

示例12: touch

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void touch(ISearchQuery query) {
  synchronized (this) {
    if (fQueries.contains(query)) {
      fQueries.remove(query);
      fQueries.add(0, query);
    }
  }
}
 
开发者ID:eclipse,项目名称:che,代码行数:9,代码来源:QueryManager.java

示例13: runSearchInBackground

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public boolean runSearchInBackground(ISearchQuery query, Object view) {
  if (isQueryRunning(query)) return false;

  //		// prepare view
  //		if (view == null) {
  //			getSearchViewManager().activateSearchView(true);
  //		} else {
  //			getSearchViewManager().activateSearchView(view);
  //		}

  addQuery(query);

  SearchJobRecord sjr = new SearchJobRecord(query);
  fSearchJobs.put(query, sjr);

  Job job = new InternalSearchJob(sjr);
  job.setPriority(Job.BUILD);
  job.setUser(true);

  //		IWorkbenchSiteProgressService service= getProgressService();
  //		if (service != null) {
  //			service.schedule(job, 0, true);
  //		} else {
  job.schedule();
  //		}

  return true;
}
 
开发者ID:eclipse,项目名称:che,代码行数:29,代码来源:InternalSearchUI.java

示例14: removeQuery

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void removeQuery(ISearchQuery query) {
  if (query == null) {
    throw new IllegalArgumentException();
  }
  cancelSearch(query);
  getSearchManager().removeQuery(query);
  fSearchJobs.remove(query);
}
 
开发者ID:eclipse,项目名称:che,代码行数:9,代码来源:InternalSearchUI.java

示例15: addQuery

import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void addQuery(ISearchQuery query) {
  if (query == null) {
    throw new IllegalArgumentException();
  }
  establishHistoryLimit();
  getSearchManager().addQuery(query);
}
 
开发者ID:eclipse,项目名称:che,代码行数:8,代码来源:InternalSearchUI.java


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