First part of LTTng 2.0 support
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui.tests / stubs / org / eclipse / linuxtools / lttng / stubs / service / shells / TestCommandShell.java
CommitLineData
eb1bab5b
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.lttng.stubs.service.shells;
13
14import org.eclipse.core.commands.ExecutionException;
15import org.eclipse.core.runtime.IProgressMonitor;
16import org.eclipse.linuxtools.lttng.ui.views.control.service.CommandResult;
17import org.eclipse.linuxtools.lttng.ui.views.control.service.ICommandResult;
18import org.eclipse.linuxtools.lttng.ui.views.control.service.ICommandShell;
19
20public class TestCommandShell implements ICommandShell {
21
22 protected boolean fIsConnected = false;
23
24 @Override
25 public void connect() throws ExecutionException {
26 fIsConnected = true;
27 }
28
29 @Override
30 public void disconnect() {
31 fIsConnected = false;
32 }
33
34 @Override
35 public ICommandResult executeCommand(String command, IProgressMonitor monitor) throws ExecutionException {
36 return executeCommand(command, monitor, true);
37 }
38
39 @Override
40 public ICommandResult executeCommand(String command, IProgressMonitor monitor, boolean checkReturnValue) throws ExecutionException {
41 if (fIsConnected) {
42
43 }
44 return new CommandResult(0, new String[0]);
45 }
46}
This page took 0.026672 seconds and 5 git commands to generate.