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


Java NewSearchUI.runQueryInBackground方法代码示例

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


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

示例1: open

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public void open() {
	// Execute Search
	try {
		int offset = tsFile.getPosition(getRange().startLineNumber, getRange().startColumn);
		TypeScriptSearchQuery query = new TypeScriptSearchQuery(tsFile.getResource(), offset);
		NewSearchUI.runQueryInBackground(query);
	} catch (TypeScriptException e) {
		e.printStackTrace();
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:12,代码来源:ReferencesCodeLens.java

示例2: performAction

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
/**
 * search버튼을 눌렀을때 수행되는 액션
 * 
 * @see org.eclipse.search.ui.ISearchPage#performAction()
 */
public boolean performAction() {
    // if (checkboxViewer.getCheckedElements() == null) {
    // MessageDialog.
    // }
    // view에 query결과를 보여준다.
    NewSearchUI.runQueryInBackground(newQuery());
    writeConfiguration();
    return true;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:15,代码来源:UMLModelSearchPage.java

示例3: run

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

示例4: performFind

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
private static void performFind(final String searchText, final boolean caseSensitive, final boolean isRegEx,
		final FileTextSearchScope searchScope)
{
	try
	{
		ISearchQuery query = TextSearchQueryProvider.getPreferred().createQuery(new TextSearchInput()
		{

			public boolean isRegExSearch()
			{
				return isRegEx;
			}

			public boolean isCaseSensitiveSearch()
			{
				return caseSensitive;
			}

			public String getSearchText()
			{
				return searchText;
			}

			public FileTextSearchScope getScope()
			{
				return searchScope; //$NON-NLS-1$
			}
		});
		NewSearchUI.runQueryInBackground(query);
	}
	catch (CoreException e1)
	{
		FindBarPlugin.log(e1);
	}
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:36,代码来源:FindHelper.java

示例5: performAction

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public boolean performAction() {
    final Criteria currentCriteria = new Criteria(searchTerm.getText(), getSelectedMatchTypes());
    NewSearchUI.runQueryInBackground(new ReferenceLibrarySearchQuery(currentCriteria, resourceSet));
    updateHistory(currentCriteria);
    writeCriteria();
    return true;
}
 
开发者ID:GRA-UML,项目名称:tool,代码行数:9,代码来源:ReferenceLibrarySearchPage.java

示例6: performAction

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public boolean performAction()
{
  if (currentSearchPage != null && currentSearchPage.isInputValid())
  {
    final IJiveSearchQuery query = currentSearchPage.createSearchQuery();
    NewSearchUI.runQueryInBackground(query);
    return true;
  }
  return false;
}
 
开发者ID:UBPL,项目名称:jive,代码行数:12,代码来源:JiveSearchPageProxy.java

示例7: doExecuteResult

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
/**
 * @see com.mulgasoft.emacsplus.commands.MinibufferExecHandler#doExecuteResult(org.eclipse.ui.texteditor.ITextEditor, java.lang.Object)
 */
public boolean doExecuteResult(ITextEditor editor, Object minibufferResult) {
	TextSearchQueryProvider provider= TextSearchQueryProvider.getPreferred();
	ISearchResult result = (ISearchResult)minibufferResult; 
	try {
		ISearchQuery query= provider.createQuery(getTextInput(result.getSearchStr(),result.isCaseSensitive(),getInputObject(editor)));
		if (query != null) {
			// and execute the search
			NewSearchUI.runQueryInBackground(query);
		}	
	} catch (OperationCanceledException ex) {
		// action canceled
	} catch (CoreException e) {}
	return true;
}
 
开发者ID:MulgaSoft,项目名称:e4macs,代码行数:18,代码来源:TagsSearchHandler.java

示例8: performAction

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public boolean performAction() {
    ScopeAndData scopeAndData = getScopeAndData();
    SearchIndexData data = new SearchIndexData(fPattern.getText(), fIsCaseSensitiveCheckbox.getSelection(),
            fIsWholeWordCheckbox.getSelection(), scopeAndData.scope, scopeAndData.scopeData, "*"); // filenamePattern is always * for Python searches (we'll always be searching the whole index).
    PySearchIndexQuery query = new PySearchIndexQuery(data);
    NewSearchUI.runQueryInBackground(query);
    searchIndexDataHistory.add(data);
    searchIndexDataHistory.writeConfiguration();
    return true;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:12,代码来源:PySearchIndexPage.java

示例9: perform

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
protected String perform(IAction action, IProgressMonitor monitor) throws Exception {
    IPyRefactoring2 r = (IPyRefactoring2) AbstractPyRefactoring.getPyRefactoring();
    RefactoringRequest req = getRefactoringRequest(new NullProgressMonitor()); //as we're doing it in the background
    req.fillInitialNameAndOffset();
    if (req.initialName != null && req.initialName.trim().length() > 0) {
        NewSearchUI.runQueryInBackground(newQuery(r, req));
    }
    return null;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:11,代码来源:PyFindAllOccurrences.java

示例10: performAction

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
public boolean performAction() {
    try {
        NewSearchUI.activateSearchResultView();
        NewSearchUI.runQueryInBackground(newQuery());
    } catch (CoreException e) {
        ErrorDialog.openError(getShell(), SearchMessages.TextSearchPage_replace_searchproblems_title,
                SearchMessages.TextSearchPage_replace_searchproblems_message, e.getStatus());
        return false;
    }
    return true;
}
 
开发者ID:McGill-DP-Group,项目名称:seg.jUCMNav,代码行数:12,代码来源:UrnSearchPage.java

示例11: performAction

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public boolean performAction() {
  try {
    NewSearchUI.runQueryInBackground(newQuery());
  } catch (CoreException e) {
    ErrorDialog.openError(getShell(), "Search",
        "Problems occurred while searching. The affected files will be skipped.", e.getStatus());
    return false;
  }
  return true;
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:12,代码来源:GoSearchPage.java

示例12: open

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public void open() {
	// Execute Search
	EditorConfigSearchQuery query = new EditorConfigSearchQuery(section, configFile);
	NewSearchUI.runQueryInBackground(query);
}
 
开发者ID:angelozerr,项目名称:ec4e,代码行数:7,代码来源:EditorConfigCodeLens.java

示例13: execute

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
public void execute() {
	NewSearchUI.activateSearchResultView();
	NewSearchUI.runQueryInBackground(referenceQuery);
}
 
开发者ID:cplutte,项目名称:bts,代码行数:5,代码来源:ReferenceQueryExecutor.java

示例14: performAction

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public boolean performAction() {
	EntrySearch.Pattern pat = new EntrySearch.Pattern(
			queryStr.getText(),
			isCaseSensitive.getSelection(),
			isRegex.getSelection());
	List<EntrySearch.Objective> objs = new ArrayList<>(10);
	if(searchAsId.getSelection()) {
		objs.add(EntrySearch.Objective.ID);
	}
	if(searchAsName.getSelection()) {
		objs.add(EntrySearch.Objective.NAME);
	}
	if(searchAsPath.getSelection()) {
		objs.add(EntrySearch.Objective.PATH);
	}
	if(searchAsCaption.getSelection()) {
		objs.add(EntrySearch.Objective.CAPTION);
	}
	if(searchAsValue.getSelection()) {
		objs.add(EntrySearch.Objective.VALUE);
	}

	String valuePath = null;
	if(limitedToValuePath.isEnabled() && limitedToValuePath.getSelection()) {
		valuePath = limitedToValuePathStr.getText();
	}
	EntrySearch.Constraint cons = new EntrySearch.Constraint(
			limitedToLeaf.getSelection(),
			valuePath != null ? TreePath.fromStr(valuePath) : null
	);
    EntrySearchQuery query = new EntrySearchQuery(pat, objs, cons);

    try {
        if(query.canRunInBackground()) {
            NewSearchUI.runQueryInBackground(query);
        }
        else {
            NewSearchUI.runQueryInForeground(null, query);
        }
    }
    catch (Exception e) {
        throw new RuntimeException(e);
    }

    return true;
}
 
开发者ID:insweat,项目名称:hssd,代码行数:48,代码来源:EntrySearchPage.java

示例15: performAction

import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
/**
    * This is run when the "search" button is pressed.
    */
@Override
public boolean performAction() {	
	saveWidgetValues();

	if(searchQueries.size() == 0){
		return false;
	}
	
	searcher.clearQueries();
	
	if(hasAllMustNotQueries()){
		searcher.addQuery(PlanSearcher.DEFAULT_QUERY); 
	}
	
	for(PlanSearchDialogQuery query : searchQueries){
		query.getPlanSearchInput().setDefaultBooleanID(defaultBooleanOption.getSelectionIndex());
		query.getPlanSearchInput().addQueries(searcher);
	}
	
	try{
		ISearchResultViewPart view = NewSearchUI.activateSearchResultView();
		IActionBars actionBars = view.getViewSite().getActionBars();
		OperationHistoryActionHandler undoHandler = (OperationHistoryActionHandler)actionBars.getGlobalActionHandler(ActionFactory.UNDO.getId());
		PlatformUI.getWorkbench().getOperationSupport().getUndoContext();
		undoHandler.setContext(IOperationHistory.GLOBAL_UNDO_CONTEXT);
		OperationHistoryActionHandler redoHandler = (OperationHistoryActionHandler)actionBars.getGlobalActionHandler(ActionFactory.REDO.getId());
		redoHandler.setContext(IOperationHistory.GLOBAL_UNDO_CONTEXT);
	
		String searchLabel = "";
		for(int i = 0; i < searchQueries.size(); i++){
			searchLabel += searchQueries.get(i).getPlanSearchInput().getSearchLabel();
		
			if(i < searchQueries.size() - 1){
				searchLabel += ",\n";
			}
		}
		// don't run query until the indexer is finished. (stop waiting after 3 seconds).
		indexingCompletedLatch.await(maximumIndexingWaitTime, TimeUnit.SECONDS);
		NewSearchUI.runQueryInBackground(new PlanSearchQuery(searchLabel, searcher, indexer));
	}
	catch (Exception e){
		LogUtil.error(e.getMessage());
		System.out.println("Exception in performing search action: " + e.getMessage());
		return false;
	}

	return true;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:52,代码来源:PlanSearchPage.java


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