This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 69493

Summary: A useful live template for firing events
Product: java Reporter: Tim Lebedkov <lebedkov>
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Tim Lebedkov 2005-11-28 19:21:07 UTC
${Foo}Event event = null;
Object[] listeners = ${listenerList
instanceof="javax.swing.event.EventListenerList"}.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
    if (listeners[i] == ${Foo}Listener.class) {
        if (event == null)
             event = new ${Foo}Event(this);
        ((${Foo}Listener) listeners[i + 1]).${method}(event);
    }
}