Improve package tangle index for LTTng 2.0 control design
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui.tests / stubs / org / eclipse / linuxtools / internal / lttng2 / stubs / dialogs / EnableChannelDialogStub.java
CommitLineData
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 **********************************************************************/
12package org.eclipse.linuxtools.internal.lttng2.stubs.dialogs;
13
9315aeee
BH
14import org.eclipse.linuxtools.internal.lttng2.core.control.model.IChannelInfo;
15import org.eclipse.linuxtools.internal.lttng2.core.control.model.impl.ChannelInfo;
d62bfa55 16import org.eclipse.linuxtools.internal.lttng2.ui.views.control.dialogs.IEnableChannelDialog;
a26d90be
BH
17import org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.impl.TraceDomainComponent;
18
19/**
20 * Create channel dialog stub implementation.
21 */
d62bfa55 22public class EnableChannelDialogStub implements IEnableChannelDialog {
a26d90be
BH
23
24 // ------------------------------------------------------------------------
25 // Attributes
26 // ------------------------------------------------------------------------
27 private TraceDomainComponent fDomain;
28 private ChannelInfo fChannelInfo;
29 private boolean fIsKernel;
30
31 // ------------------------------------------------------------------------
32 // Constructor
33 // ------------------------------------------------------------------------
d62bfa55 34 public EnableChannelDialogStub() {
a26d90be
BH
35 fChannelInfo = new ChannelInfo("mychannel"); //$NON-NLS-1$
36 fChannelInfo.setNumberOfSubBuffers(4);
37 fChannelInfo.setOverwriteMode(true);
38 fChannelInfo.setReadTimer(200);
39 fChannelInfo.setSwitchTimer(100);
40 fChannelInfo.setSubBufferSize(16384);
41 }
42
43 // ------------------------------------------------------------------------
44 // Accessors
45 // ------------------------------------------------------------------------
46 public void setIsKernel(boolean isKernel) {
47 fIsKernel = isKernel;
48 }
49
50 @Override
51 public IChannelInfo getChannelInfo() {
52 return fChannelInfo;
53 }
54
55 @Override
56 public void setDomainComponent(TraceDomainComponent domain) {
57 fDomain = domain;
58 if (fDomain != null) {
59 fIsKernel = fDomain.isKernel();
60 }
61 }
62
63 @Override
64 public int open() {
65 return 0;
66 }
67
68 @Override
69 public boolean isKernel() {
70 return fIsKernel;
71 }
72
73 public void setChannelInfo(ChannelInfo info) {
74 fChannelInfo = info;
75 }
76}
This page took 0.027417 seconds and 5 git commands to generate.