|
1 /* |
|
2 * Copyright (c) 2007 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 * Event list entry, which contains a reference to TraceLocation |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracebuilder.eventhandler; |
|
20 |
|
21 import org.eclipse.jface.action.IMenuManager; |
|
22 |
|
23 import com.nokia.trace.eventview.TraceEventList; |
|
24 import com.nokia.tracebuilder.action.TraceViewActions; |
|
25 import com.nokia.tracebuilder.engine.TraceBuilderGlobals; |
|
26 import com.nokia.tracebuilder.engine.TraceLocation; |
|
27 import com.nokia.tracebuilder.engine.TraceLocationListener; |
|
28 |
|
29 /** |
|
30 * Event list entry, which contains a reference to TraceLocation |
|
31 * |
|
32 */ |
|
33 class EventListEntryTraceLocation extends EventListEntrySourceLocation |
|
34 implements TraceLocationListener { |
|
35 |
|
36 /** |
|
37 * Constructor |
|
38 * |
|
39 * @param type |
|
40 * event type |
|
41 * @param description |
|
42 * event description |
|
43 * @param eventList |
|
44 * the event list |
|
45 * @param location |
|
46 * the event location |
|
47 */ |
|
48 public EventListEntryTraceLocation(int type, String description, |
|
49 TraceEventList eventList, TraceLocation location) { |
|
50 super(type, description, eventList, location); |
|
51 } |
|
52 |
|
53 /** |
|
54 * Gets the location |
|
55 * |
|
56 * @return the location |
|
57 */ |
|
58 public TraceLocation getTraceLocation() { |
|
59 return (TraceLocation) location; |
|
60 } |
|
61 |
|
62 /* |
|
63 * (non-Javadoc) |
|
64 * |
|
65 * @see com.nokia.trace.eventview.EventListEntryString#hasSourceActions() |
|
66 */ |
|
67 @Override |
|
68 protected boolean hasSourceActions() { |
|
69 return hasSource(); |
|
70 } |
|
71 |
|
72 /* |
|
73 * (non-Javadoc) |
|
74 * |
|
75 * @see com.nokia.trace.eventview.EventListEntryString# |
|
76 * addSourceActions(org.eclipse.jface.action.IMenuManager) |
|
77 */ |
|
78 @Override |
|
79 protected void addSourceActions(IMenuManager manager) { |
|
80 ((TraceViewActions) TraceBuilderGlobals.getActions()) |
|
81 .fillContextMenu(manager); |
|
82 } |
|
83 |
|
84 /* |
|
85 * (non-Javadoc) |
|
86 * |
|
87 * @see com.nokia.tracebuilder.engine.TraceLocationListener# |
|
88 * locationContentChanged(com.nokia.tracebuilder.engine.TraceLocation) |
|
89 */ |
|
90 public void locationContentChanged(TraceLocation location) { |
|
91 eventList.updateEntry(this); |
|
92 } |
|
93 |
|
94 /* |
|
95 * (non-Javadoc) |
|
96 * |
|
97 * @see com.nokia.tracebuilder.engine.TraceLocationListener# |
|
98 * locationValidityChanged(com.nokia.tracebuilder.engine.TraceLocation) |
|
99 */ |
|
100 public void locationValidityChanged(TraceLocation location) { |
|
101 } |
|
102 |
|
103 } |