Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Reading the process output in TE

Hi Uwe,

On Thu, Aug 23, 2012 at 11:08 AM, Stieber, Uwe
<Uwe.Stieber@xxxxxxxxxxxxx> wrote:
> Hi Anna,
>
> I've added a small unit test covering this scenario as org.eclipse.tcf.te.tests.tcf.processes.launcher.ProcessLauncherTestCase. It uses the ProcessLauncher directly and reads the process output via a proxy.

Thanks a lot, it's really helpful! However, I have one question about this test:
can we use the callback mechanism in the launcher.launch call(right
now this argument is null) instead of calling waitAndDispatch(5000)?

> BTW: Have you any references to ProcessModel.getProcessModel(<peermodel>)? It's on my list to do some refactorings there and those wont be API compatible I'm afraid.

No, I do not atm.

Thanks for your help!
Anna.

>
>
>> -----Original Message-----
>> From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Anna
>> Dushistova
>> Sent: Mittwoch, 22. August 2012 10:30
>> To: TCF Development
>> Subject: Re: [tcf-dev] Reading the process output in TE
>>
>> Hi Uwe,
>> I would like to use this functionality for, say, running things like perf and lttng which output has to be
>> parsed before showing it to user.
>> Or to find out whether gdbserver is ready for connection, see line 126 here:
>> http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/tree/cross/org.eclipse.cdt.launch.remote/src/org/eclip
>> se/cdt/launch/remote/launching/RemoteGdbLaunchDelegate.java
>>
>> So if you could provide me with a little unit test that reads the output of "echo hello", I would really
>> appreciate it.
>>
>> Thank a lot for helping me!
>> Anna.
>>
>> On Wed, Aug 22, 2012 at 11:22 AM, Stieber, Uwe <Uwe.Stieber@xxxxxxxxxxxxx> wrote:
>> > Hi Anna,
>> >
>> > The IProcessStreamsProxy is the way to go, yes. On constructing the ProcessLauncher, you pass in
>> the proxy instance which will receive the output. It is not implemented at the moment because I do
>> not have a direct use case for it, but the ProcessLauncher is designed to support it.
>> >
>> > Best regards, Uwe :)
>> >
>> >
>> >> -----Original Message-----
>> >> From: tcf-dev-bounces@xxxxxxxxxxx
>> >> [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Anna Dushistova
>> >> Sent: Dienstag, 21. August 2012 13:48
>> >> To: TCF Development
>> >> Subject: [tcf-dev] Reading the process output in TE
>> >>
>> >> Hi All,
>> >>
>> >> The default is to stream the process output to the terminal. However,
>> >> sometimes it would be nice to be able to launch a command and get the output back without
>> showing it.
>> >> I found an IProcessStreamsProxy interface that seems to be suitable
>> >> for these purposes but there doesn't seem to be anything that implements it.
>> >> Is it the way to go or is there some other recommended way to achieve what I need?
>> >>
>> >> Thanks!
>> >> Anna.
>> >> _______________________________________________
>> >> tcf-dev mailing list
>> >> tcf-dev@xxxxxxxxxxx
>> >> http://dev.eclipse.org/mailman/listinfo/tcf-dev
>> > _______________________________________________
>> > tcf-dev mailing list
>> > tcf-dev@xxxxxxxxxxx
>> > http://dev.eclipse.org/mailman/listinfo/tcf-dev
>> _______________________________________________
>> tcf-dev mailing list
>> tcf-dev@xxxxxxxxxxx
>> http://dev.eclipse.org/mailman/listinfo/tcf-dev
> _______________________________________________
> tcf-dev mailing list
> tcf-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/tcf-dev


Back to the top