ctf: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.lttng2.control.ui.tests / stubs / org / eclipse / tracecompass / internal / lttng2 / control / stubs / dialogs / GetEventInfoDialogStub.java
1 /**********************************************************************
2 * Copyright (c) 2012, 2014 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.tracecompass.internal.lttng2.control.stubs.dialogs;
13
14 import java.util.Arrays;
15
16 import org.eclipse.tracecompass.internal.lttng2.control.ui.views.dialogs.IGetEventInfoDialog;
17 import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
18 import org.eclipse.tracecompass.internal.lttng2.control.ui.views.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 private String fFilterExpression;
27
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) {
44 if (sessions != null) {
45 fSessions = Arrays.copyOf(sessions, sessions.length);
46 return;
47 }
48 fSessions = null;
49 }
50
51 @Override
52 public String getFilterExpression() {
53 return fFilterExpression;
54 }
55
56 @Override
57 public int open() {
58 return 0;
59 }
60
61 /**
62 * @param filter the filter to set
63 */
64 public void setFilterExpression(String filter) {
65 fFilterExpression = filter;
66 }
67 }
68
This page took 0.034884 seconds and 5 git commands to generate.