| Summary: | RSE remote services did not get initialized | ||
|---|---|---|---|
| Product: | [Tools] PTP | Reporter: | Vivian Kong <vivkong> |
| Component: | Core | Assignee: | Vivian Kong <vivkong> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | g.watson, mlindo, ptp-inbox, recoskie, sven.efftinge |
| Version: | 4.0.6 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Vivian Kong
I changed this somewhat for HEAD to try and avoid the initialization problems. Can you take a look at the latest code to see if it solves the problem? (In reply to comment #1) > I changed this somewhat for HEAD to try and avoid the initialization problems. > Can you take a look at the latest code to see if it solves the problem? I couldn't reproduce the problem I saw on HEAD anymore. Can your change be backported to 4.0.x branch? Also, would we need the following changes to RemoteServicesProxy.loadServices()? ### Eclipse Workspace Patch 1.0 #P org.eclipse.ptp.remote.core Index: src/org/eclipse/ptp/remote/internal/core/RemoteServicesProxy.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.ptp/core/org.eclipse.ptp.remote.core/src/org/eclipse/ptp/remote/internal/core/RemoteServicesProxy.java,v retrieving revision 1.9 diff -u -r1.9 RemoteServicesProxy.java --- src/org/eclipse/ptp/remote/internal/core/RemoteServicesProxy.java 28 Mar 2011 15:00:23 -0000 1.9 +++ src/org/eclipse/ptp/remote/internal/core/RemoteServicesProxy.java 25 Apr 2011 13:39:51 -0000 @@ -141,6 +141,8 @@ if (factory != null) { fDelegate = factory.getServices(this); } + } else if (!fDelegate.isInitialized()) { + fDelegate.initialize(); } } } I don't think this can be backported because it required API changes. In HEAD, you should be calling either one of the PTPRemoteUIPlugin#getRemoteServices() methods (or the PTPRemoteCorePlugin#getRemoteServices() methods that take IProgressMonitor arguments.) These methods ensure that the remote service provider is initialized before returning. I would suggest providing your own implementation of PTPRemoteUIPlugin#getRemoteServices(). The patch is not required as initialization is taken care of if one of the above methods is used. (In reply to comment #3) > I don't think this can be backported because it required API changes. In HEAD, > you should be calling either one of the PTPRemoteUIPlugin#getRemoteServices() > methods (or the PTPRemoteCorePlugin#getRemoteServices() methods that take > IProgressMonitor arguments.) These methods ensure that the remote service > provider is initialized before returning. I would suggest providing your own > implementation of PTPRemoteUIPlugin#getRemoteServices(). > > The patch is not required as initialization is taken care of if one of the > above methods is used. I found that even if I have my own implementation of PTPRemoteUIPlugin#getRemoteServices(), I'd still need to add getRemoteServices() method that take IProgressMonitor argument in PTPRemoteCorePlugin (unless I change the behaviour of existing PTPRemoteCorePlugin #getRemoteServices() so that the services will be initialized). I was looking at bug 320113 and looks like there should be changes in the ptp_4_0 branch for PTPRemoteCorePlugin to initialize the services but I couldn't find the changes. *** Bug 394451 has been marked as a duplicate of this bug. *** I'm assuming this won't be fixed as development has shifted to JSch/sync projects. |