ctf: Handle traces with unknown event attributes
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui.tests / widgetStubs / org / eclipse / linuxtools / tmf / ui / widgets / timegraph / test / stub / adaption / TsfImplProvider.java
CommitLineData
72eda778
ASL
1/*******************************************************************************\r
2 * Copyright (c) 2009, 2010 Ericsson\r
64636df8 3 *\r
72eda778
ASL
4 * All rights reserved. This program and the accompanying materials are\r
5 * made available under the terms of the Eclipse Public License v1.0 which\r
6 * accompanies this distribution, and is available at\r
7 * http://www.eclipse.org/legal/epl-v10.html\r
64636df8 8 *\r
72eda778
ASL
9 * Contributors:\r
10 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation\r
11 *******************************************************************************/\r
fb5cad3d 12package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.test.stub.adaption;\r
f6281059
ASL
13\r
14import java.util.HashMap;\r
15import java.util.Map;\r
16\r
b83af2c3 17import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;\r
2fa130b8 18import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r
fb5cad3d 19import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.test.stub.model.EventImpl;\r
f6281059 20\r
64636df8
BH
21/**\r
22 * Time Graph Presentation Provider Stub.\r
23 */\r
3b38ea61 24@SuppressWarnings("nls")\r
b83af2c3 25public class TsfImplProvider extends TimeGraphPresentationProvider {\r
f6281059 26\r
72eda778
ASL
27 // ========================================================================\r
28 // Methods\r
29 // ========================================================================\r
f6281059 30 @Override\r
549f3c43 31 public int getStateTableIndex(ITimeEvent event) {\r
b83af2c3 32 return 0;\r
f6281059
ASL
33 }\r
34\r
35 @Override\r
36 public Map<String, String> getEventHoverToolTipInfo(ITimeEvent revent) {\r
37 Map<String, String> toolTipEventMsgs = new HashMap<String, String>();\r
38 if (revent instanceof EventImpl) {\r
39 toolTipEventMsgs.put("Test Tip1", "Test Value tip1");\r
40 toolTipEventMsgs.put("Test Tip2", "Test Value tip2");\r
41 }\r
42\r
43 return toolTipEventMsgs;\r
44 }\r
45\r
46 @Override\r
b83af2c3 47 public String getEventName(ITimeEvent event) {\r
f6281059 48 String name = "Unknown";\r
f6281059
ASL
49 if (event instanceof EventImpl) {\r
50 EventImpl devent = (EventImpl) event;\r
51 name = devent.getType().toString();\r
52 }\r
53 return name;\r
54 }\r
f6281059 55}\r
This page took 0.03597 seconds and 5 git commands to generate.