[eclipse-users] Java-ECLiPSe: How to terminate execution of EclipseConnection.rpc(...) ?

From: Christian Pfaller <pfaller_at_...49...>
Date: Wed, 25 Apr 2007 15:51:22 +0200
I'm calling ECLiPSe via the Java-ECLiPSe interface and I want to give
the user the possibility to abort the execution of the rpc(...) call to
ECLiPSe. Thus I'd like to achieve pretty the same behavior as pressing
the "interrupt" button in TkEclipse.

I was thinking about having to Java Threads: One which executes the
rpc(...) method from EclipseConnection and the other Thread which
listens, if the user wants to abort execution.

They onl solution I see so far is to use Thread.stop() ... but since Sun
doesn't recommend this at all ("... inherently unsafe ...") I'd prefer
to avoid it. (And Thread.stop() doesn't always show the desired effect).

The nice way of terminating threads - using the Thread.interrupt()
method and waiting for an InteruptExeception seems to be not supported
by the rpc(...) methods of ECLiPSe. So, is there any other safe way to
terminate rpc(...) ? Maybe someone could post some example code.

I'm using the EmbeddedEclipse engine. I'm not sure if this could be
easier solved by OutOfProcessEclipse or RemoteEclipse but in any case
I'm quite unsure what's a good way of terminating the call to ECLiPSe.

Thanks in advance for any hints,
Chris
Received on Wed Apr 25 2007 - 14:51:28 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:19 CEST