Initiate the attachment of the remote development tools, providing the user with more control over the connection than attach_tools/0. The predicate will create a connection waiting for the remote development tools to be attached to. It will then execute Goal and then tries to complete the connection by waiting at most TimeOut seconds for the remote development tools to connect. If TimeOut is the atom block, then it will wait indefinitely.
Address is the Host/Port address that the remote connection will be made. This can be left as a variable, so that the system can determine its own address, or the user can specify a specific Port. The main purpose for Goal is to allow the user to start out the remote development tools from it using Address, so that the user does not need to manually connect the remote development tools. Control is initially given back to ECLiPSe when the tools have been attached.
The predicate will fail or throw an exception if Goal respectively fails or throw an exception. It will also fail if it waits more than TimeOut seconds for the remote tools to connect. In these cases, the server socket will be properly closed.
attach_tools/0 can be implemented using attach_tools/3 as follows:
attach_tools :- attach_tools(_, block, true).
% the following will cause the remote tools to start automatically % if tktools can be run from a shell. It will wait 10 seconds before % failing and closing the server socket. [eclipse 2]: attach_tools(H/P,10, exec(['tktools','--','-h',H,'-p',P], , Pid)). H = 'cow.icparc.ic.ac.uk' P = 1953 Pid = 27678 Yes (0.04s cpu) [eclipse 3]: