[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ptp-dev] Remote Host programmatically
|
Roberto,
The Remote Environment view (in fact all of the org.eclipse.ptp.remotetools.* plugins) are deprecated and will be removed in the next release.
The current remote services plugins (org.eclipse.remote.*) provide a preferences page (under Remote Development>Connections) that allows you to add/remove/edit connections.
You can do this programmatically using the IRemoteConnectionManager#newConnection(String name) API. You would do this using something like the following:
URI uri = new URI(“ssh:///“);
IRemoteServices remoteServices = RemoteServices.getRemoteServices(uri);
if (remoteServices != null) {
IRemoteConnectionManager connManager = remoteServices.getConnectionManager();
IRemoteConnectionWorkingCopy newConnection = connManager.newConnection(“a new connection”);
newConnection.setUser(“<user>");
newConnection.setHost(“<host>”);
newConnection.save();
}
If you still really want to do this with Remote Tools, you could do it in a similar way, except use the URI “remotetools:///“ instead of “ssh:///“. You can also do it via the Remote Tools plugins themselves, but this is a bit more complicated.
Regards,
Greg
On Aug 18, 2014, at 2:17 PM, Roberto Oliveira <rdutra@xxxxxxxxxxxxxxxxxx> wrote:
> Hi folks,
>
> Is there a way to programmatically create a new Remote host configuration in the Remote environment view?
>
> Thanks!
>
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/ptp-dev