Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Target Management » Custom RSE view - observations & help needed
Custom RSE view - observations & help needed [message #569874] Wed, 22 August 2007 16:15
Bryan Hunt is currently offline Bryan HuntFriend
Messages: 366
Registered: July 2009
Senior Member
I'm trying to create a custom remote file explorer on top of RSE. I've
managed to create an sftp connection to a remote host, but now I'm lost
in the UI code. I'm having problems figuring out how to display a list
of remote files for a specified directory from the subsystem. I'm
pretty sure I need to create a filter for each directory I want the
user to navigate, but I'm a bit confused on the API in this area.
Here's what I've done so far:

ISystemRegistry systemRegistry = RSECorePlugin.getTheSystemRegistry();
IRSECoreRegistry coreRegistry = RSECorePlugin.getTheCoreRegistry();
IRSESystemType systemType =
coreRegistry.getSystemTypeById(IRSESystemType.SYSTEMTYPE_SSH _ONLY_ID);

ISystemProfile profile =
systemRegistry.createSystemProfile("fexplorer", true);
IHost host = profile.createHost(systemType, "explorer", hostName,
"Directory explorer");
ISubSystem[] subsystems = hosts.getSubSystems();


for(ISubSystem subsystem : subsystems)
System.out.println("Connecting to: " + subsystem.getName());
subsystem.connect(new NullProgressMonitor(), false);
System.out.println("Has children: " + subsystem.hasChildren());
catch (Exception e)
// TODO Auto-generated catch block

A couple of observations here:

I wasn't expecting to have to load the RSEUIPlugin since I'm not using
any of the RSE UI code, but if you don't load that plugin,
RSECorePlugin.getTheSystemRegistry() returns null.

I wasn't expecting to have to create a profile since the docs seemed to
indicate that a default private profile will be created. If I didn't
create a profile, my code ran fine as long as I was running under the
debugger, but as soon as I ran without the debugger, I got an
ArrayIndexOutOfBoundsException inside RSE.

I'm going to keep looking at the code, but if anyone can offer some
help in getting from a sftp subsystem to my own TreeViewer, it would
certainly save me some time.

Previous Topic:slow connection to Linux sever
Next Topic:remote debugging - Windows/Unix
Goto Forum:

Current Time: Wed Apr 25 06:59:16 GMT 2018

Powered by FUDForum. Page generated in 0.01496 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software