Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329248 - [ltk] "A file or folder with this name already exist" on empty input for resource rename dialog
Summary: [ltk] "A file or folder with this name already exist" on empty input for reso...
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 07:01 EDT by Ilya Platonov CLA
Modified: 2010-11-03 13:02 EDT (History)
4 users (show)

See Also:


Attachments
screenshot (22.17 KB, image/png)
2010-11-02 07:02 EDT, Ilya Platonov CLA
no flags Details
Changed order of validation (1.60 KB, patch)
2010-11-03 08:52 EDT, Malgorzata Janczarska CLA
daniel_megert: iplog+
daniel_megert: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Platonov CLA 2010-11-02 07:01:30 EDT
Build Identifier: Version: 3.6.1 Build id: M20100909-0800

Inappropriate error message "A file or folder with this name already exist" appears on empty input for Resource Rename dialog.

Reproducible: Always

Steps to Reproduce:
Steps to reproduce:
1) Create any file
2) Press F2 on it
3) Delete all text in opened "Rename Resource" dialog
4) Inappropriate error message "A file or folder with this name already exist" will appear
Comment 1 Ilya Platonov CLA 2010-11-02 07:02:22 EDT
Created attachment 182199 [details]
screenshot

Submitting screenshot
Comment 2 Malgorzata Janczarska CLA 2010-11-03 08:52:02 EDT
Created attachment 182290 [details]
Changed order of validation

The same error displayed as well for ?\? and ?/? file names. The reason that validator displayed the ?already exists? message was that the full path of target file was identical with parent directory. I?ve moved validation of the name earlier and now validator displays correct message.
Comment 3 Szymon Brandys CLA 2010-11-03 09:02:21 EDT
Moving to JDT/UI.
Comment 4 Dani Megert CLA 2010-11-03 13:02:02 EDT
Well, the original problem is in IContainer.findMember(String): it specifies to find the members with the given *name* but there is no member with name "". Looking at the implementation, the method actually treats the name as path. I've filed bug 329373 to track this.

Having said that, the patch works and I've committed it to HEAD (including updated copyright date).
Available in builds >= N20101103-2000.