diff options
Diffstat (limited to 'plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/CommandOutputProcessor.java')
-rw-r--r-- | plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/CommandOutputProcessor.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/CommandOutputProcessor.java b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/CommandOutputProcessor.java new file mode 100644 index 0000000..081e6d4 --- /dev/null +++ b/plugins/org.yocto.remote.utils/src/org/yocto/remote/utils/CommandOutputProcessor.java | |||
@@ -0,0 +1,43 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2013 Intel Corporation. | ||
3 | * All rights reserved. This program and the accompanying materials | ||
4 | * are made available under the terms of the Eclipse Public License v1.0 | ||
5 | * which accompanies this distribution, and is available at | ||
6 | * http://www.eclipse.org/legal/epl-v10.html | ||
7 | * | ||
8 | * Contributors: | ||
9 | * Ioana Grigoropol(Intel) - initial API and implementation | ||
10 | *******************************************************************************/ | ||
11 | package org.yocto.remote.utils; | ||
12 | |||
13 | import org.eclipse.core.runtime.IProgressMonitor; | ||
14 | import org.eclipse.rse.services.shells.IHostShell; | ||
15 | |||
16 | public class CommandOutputProcessor extends OutputProcessor { | ||
17 | |||
18 | public CommandOutputProcessor(IProgressMonitor monitor, | ||
19 | IHostShell hostShell, CommandResponseHandler cmdHandler, String task) { | ||
20 | super(monitor, hostShell, cmdHandler, task); | ||
21 | } | ||
22 | |||
23 | @Override | ||
24 | protected boolean isErrChStop(char ch) { | ||
25 | return (ch == '\n'); | ||
26 | } | ||
27 | |||
28 | @Override | ||
29 | protected boolean isOutChStop(char ch) { | ||
30 | return (ch == '\n'); | ||
31 | } | ||
32 | |||
33 | @Override | ||
34 | protected void processOutputBufferLine(char ch, String str) { | ||
35 | processBuffer.addOutputLine(str); | ||
36 | } | ||
37 | |||
38 | @Override | ||
39 | protected void processErrorBufferLine(char ch, String str) { | ||
40 | processBuffer.addErrorLine(str); | ||
41 | } | ||
42 | |||
43 | } | ||