Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365803 - org.eclipse.ptp.remote.remotetools.ui.RemoteToolFileSystemContributor.browseFileSystem needs to be able to browse for a file in addition to a directory
Summary: org.eclipse.ptp.remote.remotetools.ui.RemoteToolFileSystemContributor.browseF...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: remote (show other bugs)
Version: Next   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 370174
Blocks:
  Show dependency tree
 
Reported: 2011-12-06 15:14 EST by Corey Ashford CLA
Modified: 2022-03-09 14:35 EST (History)
1 user (show)

See Also:


Attachments
Patch that allows browsing for a file instead of a directory. (1.25 KB, patch)
2011-12-06 15:16 EST, Corey Ashford CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Corey Ashford CLA 2011-12-06 15:14:23 EST
Build Identifier: M20110909-1335

I would like to be able to use the browseFileSystem method in the FileSystemContributor to obtain a file, rather than a directory.

The abstract class which defines this operation does not say anything about being able to obtain only a directory:
	/**
	 * Browse the file system for a URI to display to the user.
	 * @param initialPath The path to initialize the selection with.
	 * @param shell The shell to parent any required dialogs from
	 * @return URI if the file system is browsed successfully or
	 * <code>null</code> if a URI could not be determined.
	 */


As another point of reference, the RSE implementation of this method does allow selecting a file, instead of just a directory.

The fix is a one-line change, and I will attach a patch for it.

Reproducible: Always

Steps to Reproduce:
N/A
Comment 1 Corey Ashford CLA 2011-12-06 15:16:11 EST
Created attachment 208020 [details]
Patch that allows browsing for a file instead of a directory.
Comment 2 Greg Watson CLA 2012-01-30 17:03:53 EST
I agree the interface documentation is lacking, but the internal implementation of this interface for local files uses the SWT DirectoryDialog, so there is no way to browse for files on the local filesystem. Remote Tools is consistent with this behavior. Can you open a bug against the platform to see what they say?
Comment 3 Corey Ashford CLA 2012-01-30 17:21:03 EST
(In reply to comment #2)
> I agree the interface documentation is lacking, but the internal implementation
> of this interface for local files uses the SWT DirectoryDialog, so there is no
> way to browse for files on the local filesystem. Remote Tools is consistent
> with this behavior. Can you open a bug against the platform to see what they
> say?

Well, it turns out that I no longer need this to be changed, since I went another route for our implementation.  However, I will post up a bugzilla about the local fs behavior, but set it to low priority.

I'll change the importance to "minor" on this bugzilla, and make it depend on the new one.
Comment 4 Jonah Graham CLA 2022-03-09 14:35:46 EST
The org.eclipse.remote component of the Eclipse Ecosystem has a new home. It is now part of the Eclipse CDT project[1].

This change means a new Git repo[2], P2 site[3] and Bugzilla component. The org.eclipse.remote will continue to be delivered as part of the quarterly Simultaneous Release of Eclipse as well.

If this bug is no longer relevant, please feel free to comment or close the bug. If you can confirm if this issues still occurs in the latest release please do let me know in a comment.

[1] https://wiki.eclipse.org/CDT/User/NewIn106
[2] https://git.eclipse.org/c/cdt/org.eclipse.cdt.git (in the remote
directory)
[3] first CDT release will be 10.6 - P2 site will be
https://download.eclipse.org/tools/cdt/releases/10.6/

(This comment was added to all relevant org.eclipse.remote bugs along with changing the Product/component pair to CDT/remote.)