本文整理匯總了Java中org.eclipse.core.runtime.ListenerList.getListeners方法的典型用法代碼示例。如果您正苦於以下問題:Java ListenerList.getListeners方法的具體用法?Java ListenerList.getListeners怎麽用?Java ListenerList.getListeners使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.core.runtime.ListenerList
的用法示例。
在下文中一共展示了ListenerList.getListeners方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: fireSelectionChanged
import org.eclipse.core.runtime.ListenerList; //導入方法依賴的package包/類
private void fireSelectionChanged(ListenerList list, ISelection selection)
{
SelectionChangedEvent event = new SelectionChangedEvent(delegate, selection);
Object[] listeners = list.getListeners();
for (int i = 0; i < listeners.length; i++)
{
try
{
ISelectionChangedListener listener = (ISelectionChangedListener) listeners[i];
listener.selectionChanged(event);
}
catch (Exception e)
{
Logger.getLogger(ProjectEditorSelectionService.class.getName()).log(Level.WARNING, "Exception fireing selection changed: "+e.getMessage());
}
}
}
示例2: fireSelectionChanged
import org.eclipse.core.runtime.ListenerList; //導入方法依賴的package包/類
/**
* Fires the {@link ISelection} change to the given list of {@link ISelectionChangedListener}.
*
* @param list
* the list of {@link ISelectionChangedListener}
* @param selection
* the {@link ISelection}
*/
private void fireSelectionChanged(@SuppressWarnings("rawtypes") ListenerList list, ISelection selection) {
SelectionChangedEvent event = new SelectionChangedEvent(delegate, selection);
Object[] listeners = list.getListeners();
for (int i = 0; i < listeners.length; i++) {
ISelectionChangedListener listener = (ISelectionChangedListener)listeners[i];
listener.selectionChanged(event);
}
}
示例3: getListeners
import org.eclipse.core.runtime.ListenerList; //導入方法依賴的package包/類
/**
* @return the listeners attached to this event manager.
* The listeners currently attached; may be empty, but never
* null.
*
*/
protected final Object[] getListeners() {
final ListenerList list = listenerList;
if (list == null) {
return new Object[0];
}
return list.getListeners();
}
示例4: getListeners
import org.eclipse.core.runtime.ListenerList; //導入方法依賴的package包/類
/**
* Returns the listeners attached to this event manager.
*
* @return The listeners currently attached; may be empty, but never
* <code>null</code>
*/
protected final Object[] getListeners() {
final ListenerList list = listenerList;
if (list == null) {
return EMPTY_ARRAY;
}
return list.getListeners();
}
示例5: fireSelectionChanged
import org.eclipse.core.runtime.ListenerList; //導入方法依賴的package包/類
private void fireSelectionChanged(ListenerList list, ISelection selection){
SelectionChangedEvent event = new SelectionChangedEvent(delegate, selection);
Object[] listeners = list.getListeners();
for (int i = 0; i < listeners.length; i++) {
ISelectionChangedListener listener = (ISelectionChangedListener) listeners[i];
listener.selectionChanged(event);
}
}