Bug 117519 Provide clear() method on ListenerList
Please provide the following method on ListenerList /** * Removes all listeners from this list. */ public synchronized void clear() { listeners = EmptyArray; }
bundles/org.eclipse.jface/src/org/eclipse/jface/util/ListenerList.java
package org.eclipse.jface.util;
/**
 * This class is used to maintain a list of listeners, and is used in the
 * implementations of several classes within JFace which allow you to register
 * listeners of various kinds. It is a fairly lightweight object, occupying
 * minimal space when no listeners are registered.
 * <p>
 * Note that the <code>add</code> method checks for and eliminates duplicates
 * based on identity (not equality). Likewise, the <code>remove</code> method
 * compares based on identity.
 * </p>
 * <p>
 * Use the <code>getListeners</code> method when notifying listeners. Note
 * that no garbage is created if no listeners are registered. The recommended
 * code sequence for notifying all registered listeners of say,
 * <code>FooListener.eventHappened</code>, is:
 * 
 * <pre>
 * Object[] listeners = myListenerList.getListeners();
 * for (int i = 0; i &lt; listeners.length; ++i) {
 * 	((FooListener) listeners[i]).eventHappened(event);
 * }
 * </pre>
 * 
 * </p>
 * 
 * @deprecated Please use {@link org.eclipse.core.runtime.ListenerList} instead.
 */
public class ListenerList extends org.eclipse.core.runtime.ListenerList {
	/**