Commit | Line | Data |
---|---|---|
a26d90be BH |
1 | /********************************************************************** |
2 | * Copyright (c) 2012 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.internal.lttng2.stubs.dialogs; | |
13 | ||
1f2f091b BH |
14 | import java.util.Arrays; |
15 | ||
a26d90be BH |
16 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IGetEventInfoDialog; |
17 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceChannelComponent; | |
18 | import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent; | |
19 | ||
20 | /** | |
21 | * Get event information dialog stub implementation. | |
22 | */ | |
23 | public class GetEventInfoDialogStub implements IGetEventInfoDialog { | |
24 | ||
25 | private TraceSessionComponent[] fSessions; | |
26 | ||
27 | @Override | |
28 | public TraceSessionComponent getSession() { | |
29 | return fSessions[0]; | |
30 | } | |
31 | ||
32 | @Override | |
33 | public TraceChannelComponent getChannel() { | |
34 | return null; | |
35 | } | |
36 | ||
37 | @Override | |
38 | public void setIsKernel(boolean isKernel) { | |
39 | } | |
40 | ||
41 | @Override | |
42 | public void setSessions(TraceSessionComponent[] sessions) { | |
1f2f091b BH |
43 | if (sessions != null) { |
44 | fSessions = Arrays.copyOf(sessions, sessions.length); | |
45 | return; | |
46 | } | |
47 | fSessions = null; | |
a26d90be BH |
48 | } |
49 | ||
50 | @Override | |
51 | public int open() { | |
52 | return 0; | |
53 | } | |
54 | } | |
55 |