lttng: Add a diagram showing the dependencies between plugins
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui.tests / stubs / org / eclipse / linuxtools / internal / lttng2 / stubs / dialogs / EnableChannelDialogStub.java
CommitLineData
a26d90be 1/**********************************************************************
11252342 2 * Copyright (c) 2012, 2013 Ericsson
cfdb727a 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
cfdb727a
AM
8 *
9 * Contributors:
a26d90be
BH
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12package org.eclipse.linuxtools.internal.lttng2.stubs.dialogs;
13
9315aeee 14import org.eclipse.linuxtools.internal.lttng2.core.control.model.IChannelInfo;
83051fc3 15import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.BufferType;
9315aeee 16import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.ChannelInfo;
d62bfa55 17import org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableChannelDialog;
e799e5f3 18import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TargetNodeComponent;
a26d90be
BH
19import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceDomainComponent;
20
21/**
cfdb727a 22 * Create channel dialog stub implementation.
a26d90be 23 */
cfdb727a 24@SuppressWarnings("javadoc")
d62bfa55 25public class EnableChannelDialogStub implements IEnableChannelDialog {
cfdb727a 26
a26d90be
BH
27 // ------------------------------------------------------------------------
28 // Attributes
29 // ------------------------------------------------------------------------
30 private TraceDomainComponent fDomain;
31 private ChannelInfo fChannelInfo;
32 private boolean fIsKernel;
cfdb727a 33
a26d90be
BH
34 // ------------------------------------------------------------------------
35 // Constructor
36 // ------------------------------------------------------------------------
d62bfa55 37 public EnableChannelDialogStub() {
4e0b52e0 38 fChannelInfo = new ChannelInfo("mychannel");
a26d90be
BH
39 fChannelInfo.setNumberOfSubBuffers(4);
40 fChannelInfo.setOverwriteMode(true);
41 fChannelInfo.setReadTimer(200);
42 fChannelInfo.setSwitchTimer(100);
43 fChannelInfo.setSubBufferSize(16384);
44 }
cfdb727a 45
a26d90be
BH
46 // ------------------------------------------------------------------------
47 // Accessors
48 // ------------------------------------------------------------------------
49 public void setIsKernel(boolean isKernel) {
50 fIsKernel = isKernel;
51 }
cfdb727a 52
a26d90be
BH
53 @Override
54 public IChannelInfo getChannelInfo() {
55 return fChannelInfo;
56 }
57
58 @Override
59 public void setDomainComponent(TraceDomainComponent domain) {
60 fDomain = domain;
61 if (fDomain != null) {
62 fIsKernel = fDomain.isKernel();
63 }
64 }
65
66 @Override
67 public int open() {
68 return 0;
69 }
70
71 @Override
72 public boolean isKernel() {
73 return fIsKernel;
74 }
cfdb727a 75
a07c7629
BH
76 @Override
77 public void setHasKernel(boolean hasKernel) {
78 // Do nothing
79 }
80
a26d90be
BH
81 public void setChannelInfo(ChannelInfo info) {
82 fChannelInfo = info;
83 }
e799e5f3
SD
84
85 @Override
86 public void setTargetNodeComponent(TargetNodeComponent node) {
ca8c54b3 87 // Do nothing
e799e5f3 88 }
83051fc3
BH
89
90 public void setBufferType (BufferType bufferType) {
91 fChannelInfo.setBufferType(bufferType);
92 }
a26d90be 93}
This page took 0.04281 seconds and 5 git commands to generate.