This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 7367 - Must verify files/directory exists in all file choosers
Summary: Must verify files/directory exists in all file choosers
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Open File (show other bugs)
Version: 3.x
Hardware: All All
: P4 major (vote)
Assignee: Marian Petras
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2000-08-11 18:48 UTC by Ann Sunhachawee
Modified: 2004-09-03 10:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ann Sunhachawee 2000-08-11 18:48:57 UTC
File and directory names should be checked when user enters them through various
file choosers (i.e. the Open File dialog, the Mount Filesystem dialog). If it
does not exist, then an error dialog should appear. After the user acknowledges
the error dialog, the file chooser dialog should remain so they can try again.

to reproduce:
Choose File->Open File
Type in any bogus file name in the File Name field
Push return.

The file chooser dialog disappears, and nothing happens to warn user that the
file they specified is invalid.
Comment 1 Jesse Glick 2000-08-14 10:59:59 UTC
This is a UI logic bug in OpenFile module, it looks like.
Comment 2 Tomas Pavek 2000-08-14 11:53:59 UTC
Fixed in the open source trunk.
Comment 3 Tomas Pavek 2000-08-16 09:20:59 UTC
I have fixed this in the "open file" module.
But - something similar should be still done for adding Jar filesystem
(AddJarAction, FileSystemPanel). In general, any case of opening a file (or
more files) should be checked.
Code like
   if (f != null && f.isFile()) {
       ... do something with file here ...
   }
should have also some "else" and notify the user or reopen the filechooser...
Comment 4 Jaroslav Tulach 2000-08-22 14:29:59 UTC
Tomas fixed it, so why not to mark it fixed?
Comment 5 Jesse Glick 2000-08-22 16:11:59 UTC
He said it is not fixed for other cases, like mounting JARs. I don't know, but
someone should still look for these cases.
Comment 6 Ann Sunhachawee 2000-08-22 17:02:59 UTC
Tomas is right, this does file exists verification does not exist for
File -> Mount Filesystem | Mount JAR. Same behavior as the original bug report
against File->Open File.

Also, in mounting "Other"->Generic Version Control System, it is possible to
specify bogus directories. It will mount the directory specified, but will then
bring up a warning that "The working directory xyz does not exist. Select
Customize to change the working directory". If we don't allow users to use the
directory before first customizing it, we should prevent them from initially
mounting it.
Comment 7 Jesse Glick 2000-08-22 18:14:59 UTC
Best to file that last part (about Generic VCS) elsewhere, since it sounds like
it applies specifically to an IE module....
Comment 8 David Strupl 2000-08-24 08:45:59 UTC
Tested, these does not behave correctly: File --> Mount Filesystem,
Explorer-Filesystem --> Mount JAR, Explorer-Filesystem --> Mount Directory
Comment 9 David Strupl 2000-08-24 12:59:59 UTC
Fixed file dialogs from File --> Mount filesystem
Comment 10 David Strupl 2000-10-02 11:43:59 UTC
It looks like general UI bug (especially the formulation in all file choosers).
I am forwarding this to the UI team.
Comment 11 Jan Zajicek 2001-01-23 09:30:59 UTC
Automated change of version from Other to Dev.
Comment 12 Jan Chalupa 2001-03-12 09:36:10 UTC
Version: 'Dev' -> 3.2
Comment 13 Jan Chalupa 2001-05-05 20:36:44 UTC
Target milestone -> 3.3
Comment 14 Jiri Mzourek 2001-09-10 10:33:49 UTC
x
Comment 15 Jiri Mzourek 2001-09-14 08:45:58 UTC
Reopened, this bug still exists.
Comment 16 Jaroslav Tulach 2001-10-23 09:51:54 UTC
1. I suggest to fix this bug just in FileEditor, and everybody else to
use the editor. Which I believe is fixed (because mount wizard
enables/disabled correctly).

2. Until a list of all modules that need to be changed is given, there
is no reason why have this bug in statistics. Especially openide/core
statistics if the core/openide is ok.
Comment 17 Jesse Glick 2002-02-20 12:34:54 UTC
x
Comment 18 Jesse Glick 2002-02-20 12:35:53 UTC
Ann's task to check what still needs to be done.
Comment 19 Ann Sunhachawee 2002-02-20 17:18:40 UTC
looking at 3.3.1, i still see weird functionality that I would claim
the original bug is not fixed. 

Try File | Open File... . Type in some bogus name. The IDE mounts
whatever directory the filechooser was in at the moment, and nothing
is said about the file user typed in being invalid. The user is trying
to open the file they typed in. Mounting the directory is a side
effect of the process, but is not the end desired result. User should
be told why a file is not opened.

As for JAR files, i looked at the behavior and see that the problem
was somewhat addressed, though i filed bug 14317 for the behavior.

I have not checked VCS mounting functionality, nor am not
knowledgeable enough about the codebase enough to know where all the
other filechoosers and validation occurs to report on any other
filechoosers. I agree with Jarda's comment about architecturally, all
filechooser that needs to do this type of validation should use the
same code so that they all behave the same.
Comment 20 David Simonek 2002-05-30 10:21:24 UTC
changing back to defect, as this is really a bug IMO (will look if
it's fixed now or not)
Comment 21 David Simonek 2002-05-30 14:32:49 UTC
Ok, my analysis:
- Ann is right, Open file still not completely correct (user should be
notified when it's not possible to open file - file doesn't exist or...)
- CVS/VCS seems ok
- Yarda is right, core/openide part is fixed.

therefore passing to openfile module, to fix the rest. Thx.
Comment 22 _ lkramolis 2002-07-09 21:28:50 UTC
Fixed in OpenFile module.
Comment 23 pfelenda 2003-04-03 14:39:59 UTC
The 'Open' file dialog disappeared when user type (and confirm) name
of file which doesn't exists.
This is still the same issue as reported.

[dev 200304020100]
Comment 24 Marian Petras 2004-09-03 10:31:37 UTC
Fixed in the trunk.

Modified files:

   utilities/:
      src/org/netbeans/modules/openfile/Bundle.properties   (1.35)
      src/org/netbeans/modules/openfile/FileChooser.java   (1.1 - new)
      src/org/netbeans/modules/openfile/OpenFileAction.java   (1.36)