1 | Object[] listeners = listenerList.getListenerList();↵ | | 1 | Object[] listeners = listenerList.getListenerList();↵
|
2 |
↵ | | |
|
|
3 | // Process the listeners last to first, notifying
↵ | | 2 | // Process the listeners last to first, notifying↵
|
4 | // those that are interested in this event
↵ | | 3 | // those that are interested in this event↵
|
5 | for (int i = listeners.length - 2; i >= 0; i -= 2) {
↵ | | 4 | for (int i = listeners.length - 2; i >= 0; i -= 2) {↵
|
6 | if (listeners[i] == ITagListener.class) {
↵ | | 5 | if (listeners[i] == IContextResultListener.class) {↵
|
7 | ((ITagListener) listeners[i + 1]).tagAdded(e);
↵ | | 6 | ((IContextResultListener) listeners[i + 1]).finished(e);↵
|
8 | }
↵ | | 7 | }↵
|
9 | }
↵ | | 8 | }↵
|
|
10 | }↵ | | 9 | }↵
|
|
11 | /**↵ | | |
|
12 | * @param id↵ | | |
|
13 | */↵ | | |
|
14 | protected void fireTagDeletedEvent(String id↵ | | |
|
|
15 | ) {
↵ | | 10 | void fireResultArrived(final String providerName) {↵
|
16 | ITagEvent e = new TagEvent(this, id);↵ | | 11 | final IContextResultEvent e = new ↵
|
17 |
↵ | | 12 | ContextResultEvent(this, providerName);↵
|
18 | // Guaranteed to return a non-null array
↵ | | 13 | // Guaranteed to return a non-null array↵
|
19 | Object[] listeners = listenerList.getListenerList();↵ | | 14 | final Object[] listeners = listenerList.getListenerList();↵
|
20 |
↵ | | |
|
|
21 | // Process the listeners last to first, notifying
↵ | | 15 | // Process the listeners last to first, notifying↵
|
22 | // those that are interested in this event
↵ | | 16 | // those that are interested in this event↵
|
23 | for (int i = listeners.length - 2; i >= 0; i -= 2) {
↵ | | 17 | for (int i = listeners.length - 2; i >= 0; i -= 2) {↵
|
24 | if (listeners[i] == ITagListener.class) {
↵ | | 18 | if (listeners[i] == IContextResultListener.class) {↵
|
25 | ((ITagListener) listeners[i + 1]).tagDeleted(e);
↵ | | 19 | ((IContextResultListener) listeners[i + 1]).resultArrived(e);↵
|
26 | }
↵ | | 20 | }↵
|
27 | }
↵ | | 21 | }↵
|
|
28 | } | | 22 | }
|