Search in sources :

Example 1 with IQueryListener

use of org.eclipse.search.ui.IQueryListener in project che by eclipse.

the class QueryManager method fireRemoved.

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);
    }
}
Also used : IQueryListener(org.eclipse.search.ui.IQueryListener) HashSet(java.util.HashSet) Set(java.util.Set) Iterator(java.util.Iterator) HashSet(java.util.HashSet)

Example 2 with IQueryListener

use of org.eclipse.search.ui.IQueryListener in project che by eclipse.

the class QueryManager method fireAdded.

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);
    }
}
Also used : IQueryListener(org.eclipse.search.ui.IQueryListener) HashSet(java.util.HashSet) Set(java.util.Set) Iterator(java.util.Iterator) HashSet(java.util.HashSet)

Example 3 with IQueryListener

use of org.eclipse.search.ui.IQueryListener in project eclipse.platform.text by eclipse.

the class QueryManager method fireAdded.

public void fireAdded(ISearchQuery query) {
    Set<IQueryListener> copiedListeners = new HashSet<>();
    synchronized (fListeners) {
        copiedListeners.addAll(fListeners);
    }
    Iterator<IQueryListener> listeners = copiedListeners.iterator();
    while (listeners.hasNext()) {
        IQueryListener l = listeners.next();
        l.queryAdded(query);
    }
}
Also used : IQueryListener(org.eclipse.search.ui.IQueryListener) HashSet(java.util.HashSet)

Example 4 with IQueryListener

use of org.eclipse.search.ui.IQueryListener in project eclipse.platform.text by eclipse.

the class QueryManager method fireRemoved.

public void fireRemoved(ISearchQuery query) {
    Set<IQueryListener> copiedListeners = new HashSet<>();
    synchronized (fListeners) {
        copiedListeners.addAll(fListeners);
    }
    Iterator<IQueryListener> listeners = copiedListeners.iterator();
    while (listeners.hasNext()) {
        IQueryListener l = listeners.next();
        l.queryRemoved(query);
    }
}
Also used : IQueryListener(org.eclipse.search.ui.IQueryListener) HashSet(java.util.HashSet)

Example 5 with IQueryListener

use of org.eclipse.search.ui.IQueryListener in project eclipse.platform.text by eclipse.

the class QueryManager method fireStarting.

public void fireStarting(ISearchQuery query) {
    Set<IQueryListener> copiedListeners = new HashSet<>();
    synchronized (fListeners) {
        copiedListeners.addAll(fListeners);
    }
    Iterator<IQueryListener> listeners = copiedListeners.iterator();
    while (listeners.hasNext()) {
        IQueryListener l = listeners.next();
        l.queryStarting(query);
    }
}
Also used : IQueryListener(org.eclipse.search.ui.IQueryListener) HashSet(java.util.HashSet)

Aggregations

IQueryListener (org.eclipse.search.ui.IQueryListener)10 HashSet (java.util.HashSet)8 Iterator (java.util.Iterator)4 Set (java.util.Set)4 ISearchQuery (org.eclipse.search.ui.ISearchQuery)2 ISafeRunnable (org.eclipse.core.runtime.ISafeRunnable)1 Test (org.junit.Test)1