tmf: lttngControl: Separate STDERR from output and create errorOutput
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.control.ui.tests / stubs / org / eclipse / linuxtools / internal / lttng2 / control / stubs / shells / TestCommandShell.java
CommitLineData
eb1bab5b
BH
1/**********************************************************************
2 * Copyright (c) 2012 Ericsson
cfdb727a 3 *
eb1bab5b
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:
eb1bab5b
BH
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
8e8c0226 12package org.eclipse.linuxtools.internal.lttng2.control.stubs.shells;
eb1bab5b
BH
13
14import org.eclipse.core.commands.ExecutionException;
15import org.eclipse.core.runtime.IProgressMonitor;
8e8c0226
AM
16import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.CommandResult;
17import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
18import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
eb1bab5b 19
cfdb727a
AM
20/**
21 * Command shell stub
22 */
eb1bab5b
BH
23public class TestCommandShell implements ICommandShell {
24
6f4e8ec0 25 /** If the shell is connected */
eb1bab5b 26 protected boolean fIsConnected = false;
cfdb727a 27
eb1bab5b
BH
28 @Override
29 public void connect() throws ExecutionException {
30 fIsConnected = true;
31 }
cfdb727a 32
eb1bab5b
BH
33 @Override
34 public void disconnect() {
35 fIsConnected = false;
36 }
37
38 @Override
39 public ICommandResult executeCommand(String command, IProgressMonitor monitor) throws ExecutionException {
40 return executeCommand(command, monitor, true);
41 }
42
43 @Override
44 public ICommandResult executeCommand(String command, IProgressMonitor monitor, boolean checkReturnValue) throws ExecutionException {
45 if (fIsConnected) {
cfdb727a 46
eb1bab5b 47 }
6418ef54 48 return new CommandResult(0, new String[0], new String[0]);
eb1bab5b
BH
49 }
50}
This page took 0.049865 seconds and 5 git commands to generate.