mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 11:55:40 +02:00
adapt to IHostOutput API (bug 161773, 158312)
This commit is contained in:
parent
75935aab7e
commit
7a194919a8
1 changed files with 5 additions and 3 deletions
|
@ -6,7 +6,8 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Ewa Matejska (PalmSource)
|
* Ewa Matejska (PalmSource) - initial version
|
||||||
|
* Martin Oberhuber (Wind River) - adapt to IHostOutput API (bug 161773, 158312)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.remotecdt;
|
package org.eclipse.rse.remotecdt;
|
||||||
|
@ -17,6 +18,7 @@ import java.io.OutputStream;
|
||||||
import java.io.PipedInputStream;
|
import java.io.PipedInputStream;
|
||||||
import java.io.PipedOutputStream;
|
import java.io.PipedOutputStream;
|
||||||
|
|
||||||
|
import org.eclipse.rse.services.shells.IHostOutput;
|
||||||
import org.eclipse.rse.services.shells.IHostShell;
|
import org.eclipse.rse.services.shells.IHostShell;
|
||||||
import org.eclipse.rse.services.shells.IHostShellChangeEvent;
|
import org.eclipse.rse.services.shells.IHostShellChangeEvent;
|
||||||
import org.eclipse.rse.services.shells.IHostShellOutputListener;
|
import org.eclipse.rse.services.shells.IHostShellOutputListener;
|
||||||
|
@ -106,11 +108,11 @@ IHostShellOutputListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shellOutputChanged(IHostShellChangeEvent event) {
|
public void shellOutputChanged(IHostShellChangeEvent event) {
|
||||||
Object[] input = event.getLines();
|
IHostOutput[] input = event.getLines();
|
||||||
OutputStream outputStream = event.isError() ? hostShellError : hostShellInput;
|
OutputStream outputStream = event.isError() ? hostShellError : hostShellInput;
|
||||||
try {
|
try {
|
||||||
for(int i = 0; i < input.length; i++) {
|
for(int i = 0; i < input.length; i++) {
|
||||||
outputStream.write(input[i].toString().getBytes());
|
outputStream.write(input[i].getString().getBytes());
|
||||||
outputStream.write('\n');
|
outputStream.write('\n');
|
||||||
outputStream.flush();
|
outputStream.flush();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue