lttng: Move plugins to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.lttng2.control.ui.tests / stubs / org / eclipse / linuxtools / internal / lttng2 / control / stubs / shells / TestCommandShell.java
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 **********************************************************************/
12 package org.eclipse.linuxtools.internal.lttng2.control.stubs.shells;
13
14 import org.eclipse.core.commands.ExecutionException;
15 import org.eclipse.core.runtime.IProgressMonitor;
16 import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.CommandResult;
17 import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
18 import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
19
20 /**
21 * Command shell stub
22 */
23 public class TestCommandShell implements ICommandShell {
24
25 /** If the shell is connected */
26 protected boolean fIsConnected = false;
27
28 @Override
29 public void connect() throws ExecutionException {
30 fIsConnected = true;
31 }
32
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) {
46
47 }
48 return new CommandResult(0, new String[0], new String[0]);
49 }
50 }
This page took 0.045893 seconds and 5 git commands to generate.