本文整理汇总了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);
}
示例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();
}
示例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;
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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;
}
示例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);
}
示例15: addQuery
import org.eclipse.search.ui.ISearchQuery; //导入依赖的package包/类
public void addQuery(ISearchQuery query) {
if (query == null) {
throw new IllegalArgumentException();
}
establishHistoryLimit();
getSearchManager().addQuery(query);
}