Bug 207496 - FileChooserBuilder should be able to work with other file systems
FileChooserBuilder should be able to work with other file systems
Status: REOPENED
Product: platform
Classification: Unclassified
Component: Filesystems
7.2
PC Solaris
: P3 (vote)
: Dev
Assigned To: Vladimir Kvashin
issues@platform
cndreq
: API_REVIEW_FAST
Depends on:
Blocks: 207488 236358
  Show dependency treegraph
 
Reported: 2012-01-19 08:18 UTC by Vladimir Kvashin
Modified: 2014-02-04 18:03 UTC (History)
5 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2012-01-19 08:18:15 UTC
org.openide.filesystems.FileChooserBuilder now works with disk file system only
It would be fine if it could get an instance of FileSystem in constructor and create a chooser for this file system.

There already is such functionality in org.netbeans.modules.dlight.remote; but it is too tightly connected with execution. I propose make org.openide.filesystems.FileChooserBuilder more general instead.

I'm not quite sure org.openide.filesystems is right place for such functionality, but once existing FileChooserBuilder is there, I would propose to extend it.
Comment 1 Jaroslav Tulach 2012-01-19 16:12:05 UTC
Patch?
Comment 2 Jaroslav Tulach 2012-01-26 07:28:09 UTC
No patch. No fix.
Comment 3 Jaroslav Havlin 2014-02-04 15:11:31 UTC
Having some file chooser that is able to work with file FileObjects seems quite reasonable. But it may be quite complicated.

Should the chooser support a single file system, or all known (local and remote) file system? The letter option seems more user friendly.

Extending FileChooserBuilder would be cumbersome. I would prefer creating a new class, e.g. FileObjectChooserBuilder, and related SPI classes (if needed).
Comment 4 Vladimir Kvashin 2014-02-04 18:03:12 UTC
(In reply to Jaroslav Havlin from comment #3)
...
> Should the chooser support a single file system, or all known (local and
> remote) file system? The letter option seems more user friendly.

I see two optoins here:

1) File chooser builder that is parameterized with FileSystem. This will help to solve issue 236358 easily

2) File chooser that is parameterized with an SPI interface (TBD), the interface provides a list of available file systems and their display names. File chooser allows to choose file system and then choose file in this file system.

Sure option (2) is much more complicated. The benefit is that it allows (for example) the following:
- menu item on Favorites that allows adding different file systems
- comon "Open project" / "Create project" actions (now CND has its own "Open Remote Project" and "Create Remote Project" actions in "Remote" toolbar (but not in menu).
- other situations similar to above

> 
> Extending FileChooserBuilder would be cumbersome. I would prefer creating a
> new class, e.g. FileObjectChooserBuilder, and related SPI classes (if
> needed).

I'm ok with that.

Just FYI, there is an example of FileObject-based file chooser / builder in o.n.m.remote.api.ui.FileChooserBuilder class in dlight.remote module.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo