Community
Participate
Working Groups
Actually, to import a .psf file I have to download it, Import -> Team Project Set, and after that, I usually discard the file. It would be very convenient to be able to just specify the .psf URL in the "Import Team Project Set" dialog, not having to download it.
We agree, we just don't have the manpower to spare to put this in. Patches are welcome.
Created attachment 56177 [details] Patch
Created attachment 56178 [details] mylar/context/zip
The main problem with this patch is that it is possible that reading from a remote stream will cause Eclipse to hang unless the proper precautions are taken. Have a look at bug 73683 comment 7 for a description of what is required when reading from remote streams. The Team/Core plug-in does have some classes to help with this. Have a look at the PollingInputStream class that can be used to provide progress and cancelation. They are not well documented but you can find some examples of their use in the CVS plug-ins. You will also need to wrap the socket creation in some defensive code since socket creation has no timeout. Have a ;look at the PServerConnection#ResponsiveSocketFacory class in the CVS/Core plug-in for an example of how to safely open a socket.
Is anybody currently working on this? Wouldn't it be sufficient to open the URL connection in a different thread to prevent the workbench from hanging? Maybe there are some better utility classes for this sort of scenario available at this point? Anyway, I run all the time into the problem that Willian originally described, and it would be really nice to have this addressed, especially, since it doesn't really appear to be that big of a deal to provide the suggested functionality.
*** Bug 295033 has been marked as a duplicate of this bug. ***
*** Bug 299973 has been marked as a duplicate of this bug. ***
I won't make it in 3.6M5, I'm too busy with blockers of bug 236169. Moving to 3.6M6.
Deferring due to lack of cycles in 3.6M6.
Deferring to 3.7.
Created attachment 179256 [details] Proposed patch
Created attachment 179298 [details] Corrected patch
Created attachment 179300 [details] mylyn/context/zip
The patch looks good, but I think it could be improved a little bit: * to set timeout on a connection you could reuse the org.eclipse.compare.internal.Utilities.setReadTimeout(URLConnection, int). Don't worry about reaching internals of Compare for now, this will be fixed in bug 298460. * I'm pretty sure there is an utility method you could use to replace ImportProjectSetMainPage.readPsfFromURL(InputStream, String, int, IProgressMonitor) you added * Have you considered making org.eclipse.compare.internal.patch.InputPatchPage.getURLContents(String) public (and moving it to a utility class)? It does pretty much the same thing as org.eclipse.team.internal.ui.wizards.ImportProjectSetMainPage.getURLContents() * double check all your comments, I've found few typos e.g. "Signleton" * please format all blocks of code you added in patch
Created attachment 179444 [details] Some more corrections
Created attachment 179445 [details] mylyn/context/zip
The latest patch has been applied to HEAD. Available in builds >N20100922-2000. Thanks Gosia! Could anyone from the CC list verify the fix?