Add support for filter feature of LTTng Tools 2.1
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui.tests / stubs / org / eclipse / linuxtools / internal / lttng2 / stubs / dialogs / GetEventInfoDialogStub.java
CommitLineData
a26d90be
BH
1/**********************************************************************
2 * Copyright (c) 2012 Ericsson
d4514365 3 *
a26d90be
BH
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
d4514365
BH
8 *
9 * Contributors:
a26d90be
BH
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12package org.eclipse.linuxtools.internal.lttng2.stubs.dialogs;
13
1f2f091b
BH
14import java.util.Arrays;
15
a26d90be
BH
16import org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IGetEventInfoDialog;
17import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceChannelComponent;
18import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceSessionComponent;
19
20/**
d4514365 21 * Get event information dialog stub implementation.
a26d90be
BH
22 */
23public class GetEventInfoDialogStub implements IGetEventInfoDialog {
24
25 private TraceSessionComponent[] fSessions;
d4514365
BH
26 private String fFilterExpression;
27
a26d90be
BH
28 @Override
29 public TraceSessionComponent getSession() {
30 return fSessions[0];
31 }
32
33 @Override
34 public TraceChannelComponent getChannel() {
35 return null;
36 }
37
38 @Override
39 public void setIsKernel(boolean isKernel) {
40 }
41
42 @Override
43 public void setSessions(TraceSessionComponent[] sessions) {
1f2f091b
BH
44 if (sessions != null) {
45 fSessions = Arrays.copyOf(sessions, sessions.length);
46 return;
47 }
48 fSessions = null;
a26d90be
BH
49 }
50
d4514365
BH
51 @Override
52 public String getFilterExpression() {
53 return fFilterExpression;
54 }
55
a26d90be
BH
56 @Override
57 public int open() {
58 return 0;
59 }
d4514365
BH
60
61 /**
62 * @param filter the filter to set
63 */
64 public void setFilterExpression(String filter) {
65 fFilterExpression = filter;
66 }
a26d90be
BH
67}
68
This page took 0.029676 seconds and 5 git commands to generate.