Java Code Examples for org.eclipse.search.ui.NewSearchUI#removeQueryListener()

The following examples show how to use org.eclipse.search.ui.NewSearchUI#removeQueryListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InvasiveThemeHijacker.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
public void partClosed(IWorkbenchPartReference partRef)
{
	if (partRef instanceof IEditorReference)
	{
		IEditorPart part = (IEditorPart) partRef.getPart(false);
		if (part instanceof MultiPageEditorPart)
		{
			MultiPageEditorPart multi = (MultiPageEditorPart) part;
			if (pageListener != null)
			{
				multi.getSite().getSelectionProvider().removeSelectionChangedListener(pageListener);
			}
		}
	}
	// If it's a search view, remove any query listeners for it!
	else if (partRef instanceof IViewReference)
	{
		IViewPart view = (IViewPart) partRef.getPart(false);
		if (queryListeners.containsKey(view))
		{
			NewSearchUI.removeQueryListener(queryListeners.remove(view));
		}
	}
}
 
Example 2
Source File: SearchResultUpdater.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void queryRemoved(ISearchQuery query) {
    if (fResult.equals(query.getSearchResult())) {
        ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
        NewSearchUI.removeQueryListener(this);
    }
}
 
Example 3
Source File: SearchResultUpdater.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void queryRemoved(ISearchQuery query) {
    if (fResult.equals(query.getSearchResult())) {
        ResourcesPlugin.getWorkspace().removeResourceChangeListener(this);
        NewSearchUI.removeQueryListener(this);
    }
}
 
Example 4
Source File: ReferenceSearchViewPage.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
public void dispose() {
	NewSearchUI.removeQueryListener(queryListener);
	super.dispose();
}
 
Example 5
Source File: SearchResultUpdater.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public void queryRemoved(ISearchQuery query) {
	if (fResult.equals(query.getSearchResult())) {
		JavaCore.removeElementChangedListener(this);
		NewSearchUI.removeQueryListener(this);
	}
}