|
1 /* |
|
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 * Interface to the events list of the view |
|
17 * |
|
18 */ |
|
19 package com.nokia.trace.eventview; |
|
20 |
|
21 import java.util.Iterator; |
|
22 |
|
23 import org.eclipse.jface.viewers.ISelectionChangedListener; |
|
24 |
|
25 /** |
|
26 * Interface to the events list of the view. An instance of this interface is |
|
27 * available via {@link TraceEventView#getEventList() |
|
28 * TraceEventView.getEventList} |
|
29 * |
|
30 */ |
|
31 public interface TraceEventList extends Iterable<EventListEntry> { |
|
32 |
|
33 /** |
|
34 * Adds an entry to this list |
|
35 * |
|
36 * @param entry |
|
37 * the entry to be added |
|
38 */ |
|
39 public void addEntry(EventListEntry entry); |
|
40 |
|
41 /** |
|
42 * Removes an entry from this list |
|
43 * |
|
44 * @param entry |
|
45 * the entry to be removed |
|
46 */ |
|
47 public void removeEntry(EventListEntry entry); |
|
48 |
|
49 /** |
|
50 * Updates an existing entry |
|
51 * |
|
52 * @param entry |
|
53 * the entry to be updated |
|
54 */ |
|
55 public void updateEntry(EventListEntry entry); |
|
56 |
|
57 /** |
|
58 * Runs an asynchronous operation using the event view shell |
|
59 * |
|
60 * @param runnable |
|
61 * the runnable |
|
62 */ |
|
63 public void asyncExec(Runnable runnable); |
|
64 |
|
65 /** |
|
66 * Adds an event handler, which gets notified when events arrive to view |
|
67 * |
|
68 * @param handler |
|
69 * the event handler |
|
70 */ |
|
71 public void addEventHandler(TraceEventHandler handler); |
|
72 |
|
73 /** |
|
74 * Removes an event handler |
|
75 * |
|
76 * @param handler |
|
77 * the event handler |
|
78 */ |
|
79 public void removeEventHandler(TraceEventHandler handler); |
|
80 |
|
81 /** |
|
82 * Removes all events which have a source of given type |
|
83 * |
|
84 * @param type |
|
85 * the type |
|
86 */ |
|
87 public void removeAll(Class<?> type); |
|
88 |
|
89 /** |
|
90 * Gets all entries which have the given source |
|
91 * |
|
92 * @param source |
|
93 * the source |
|
94 * @return the entries with given source |
|
95 */ |
|
96 public Iterator<EventListEntry> getEntries(Object source); |
|
97 |
|
98 /** |
|
99 * Adds a selection listener to the UI |
|
100 * |
|
101 * @param listener |
|
102 * the selection listener |
|
103 */ |
|
104 public void addSelectionListener(ISelectionChangedListener listener); |
|
105 |
|
106 /** |
|
107 * Removes a selection listener |
|
108 * |
|
109 * @param listener |
|
110 * the selection listener |
|
111 */ |
|
112 public void removeSelectionListener(ISelectionChangedListener listener); |
|
113 |
|
114 /** |
|
115 * Is viewer enabled |
|
116 * |
|
117 * @return true if viewer is enable, otherwise false |
|
118 */ |
|
119 public boolean isViewerEnabled(); |
|
120 } |