Community
Participate
Working Groups
Using a file subsystem select a directory. Create a file in that directory. Immediately create another file in that directory of the same name. No error message appears. A "duplicate name dialog" should appear. Using the head stream.
This error does not appear in I20070419-0640.
Could this be due to a change in the ElementComparer?
This apparently only happens using the local file service.
I saw this for both local and remote with the new file wizard. The new file wizard name validator is not having names passed in. I've put a fix in so that we query the parent directory for names to pass into the validator. Could you update from cvs and see if you still see the same problem.
This is a different behavior than it was previously. It used to let you attempt to create the file and give you a duplicate name dialog - requesting either to overwrite the old file or to rename the new file. This requires the caller of the wizard to pass in a "used name" context, but forces you to create something that is different than anything else. I think that's OK, but is this what was intended? Are there cases where the names context is not known (i.e. the used names)? Are there cases where the case handling in the target file system may screw up the validator?
I'm not sure there would be much benefit to overwriting an existing file with an empty new file. The eclipse new file dialog doesn't let you do that either, so I think the new way is more consistent with Eclipse. The validator already had support for name handling, and I'm assuming it knows how to deal with case (i.e. via the isCaseSensitive() subsystem configuration method). All that was missing was the initial names list.
Should it say "name in use" when you type in the name of a folder? Right now on local if you type in the name of a folder that exists you can click Finish and no error is displayed. Thats because no exception is thrown when it detects the file exists. Thats part of <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=182221">bug 182221</a>.
I don't have a problem with the concept. I just want to make sure the behavior is right - correct name collision detection for the target file system, and, as Kevin points out, the right resources present in the list.
Issue's found: 1. Name validator shows no "name in use" when creating files/folders in the root of my second drive. Works on C:\ though. 2. If you have a file/folder that contains uppercase then creating a new file/folder with that name won't show "name in use".
*** Bug 184007 has been marked as a duplicate of this bug. ***
Created attachment 66150 [details] Changed name validator used to ValidatorFileUniqueName Legal Message: I, Kevin Doyle, declare that I developed attached code from scratch, without referencing any 3rd party materials except material licensed under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this contribution under the EPL.
ValidatorFileUniqueName doesn't make use of the cache however, I'm fine with that since a query per dialog shouldn't be too expensive. I'll apply the patch.
*** Bug 174850 has been marked as a duplicate of this bug. ***
The patch was applied and now this is fixed.
[target cleanup] 2.0 M7 was the original target milestone for this bug