Commit | Line | Data |
---|---|---|
73005152 BH |
1 | /********************************************************************** |
2 | * Copyright (c) 2011 Ericsson | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Bernd Hufmann - Initial API and implementation | |
11 | **********************************************************************/ | |
12 | package org.eclipse.linuxtools.tmf.ui.views.uml2sd.impl; | |
13 | ||
14 | /** | |
15 | * <b><u>TmfSyncMessages</u></b> | |
16 | * <p> | |
17 | * Extends AsyncMessage class to provide additional information about the trace event. | |
18 | * </p> | |
19 | */ | |
6c13869b | 20 | import org.eclipse.linuxtools.tmf.core.uml2sd.ITmfSyncSequenceDiagramEvent; |
73005152 | 21 | import org.eclipse.linuxtools.tmf.ui.views.uml2sd.core.SyncMessage; |
73005152 BH |
22 | |
23 | public class TmfSyncMessage extends SyncMessage implements ITmfSyncSequenceDiagramEvent { | |
24 | ||
25 | // ------------------------------------------------------------------------ | |
26 | // Attributes | |
27 | // ------------------------------------------------------------------------ | |
28 | protected ITmfSyncSequenceDiagramEvent fSdEvent; | |
29 | ||
30 | // ------------------------------------------------------------------------ | |
31 | // Constructors | |
32 | // ------------------------------------------------------------------------ | |
33 | public TmfSyncMessage(ITmfSyncSequenceDiagramEvent sdEvent, int eventOccurrence) { | |
34 | this.fSdEvent = sdEvent; | |
35 | setEventOccurrence(eventOccurrence); | |
36 | setName(sdEvent.getName()); | |
37 | setTime(sdEvent.getStartTime()); | |
38 | } | |
39 | ||
40 | // ------------------------------------------------------------------------ | |
41 | // Operations | |
42 | // ------------------------------------------------------------------------ | |
43 | ||
44 | /* | |
45 | * (non-Javadoc) | |
46 | * @see org.eclipse.linuxtools.ust.examples.event.ISequenceDiagramEvent#getSender() | |
47 | */ | |
48 | @Override | |
49 | public String getSender() { | |
50 | return fSdEvent.getSender(); | |
51 | } | |
52 | ||
53 | /* | |
54 | * (non-Javadoc) | |
55 | * @see org.eclipse.linuxtools.ust.examples.event.ISequenceDiagramEvent#getReceiver() | |
56 | */ | |
57 | @Override | |
58 | public String getReceiver() { | |
59 | return fSdEvent.getReceiver(); | |
60 | } | |
61 | } |