Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 371108 - OpenResourceDialog showing identical favorites names.
Summary: OpenResourceDialog showing identical favorites names.
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 RC1   Edit
Assignee: libing wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 12:01 EST by libing wang CLA
Modified: 2012-02-09 14:25 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description libing wang CLA 2012-02-09 12:01:12 EST
It is a really a corner case I found when fixing bug 370896.
I happened to have two test.html named for different files.
As our favorites list only stores the URL so there is no readable name for the folder.
My guess is to store a readable folder name when making a file/folder as favorite so that when we query favorites that property is returned.
Comment 1 libing wang CLA 2012-02-09 14:25:18 EST
I am fixing this by not trimming the "path" property from a favorite.
The reason is that the trimming assumes that "path" always contains "name" in it.
In file name search, it is true because the path and name pair is always something like "foo/bar.coo" and "bar.coo".

In favorites you can't really rely on this assumption because the "path" can be any URL. Even if it is a resource path, the favorite name can be changed that is not contained by "path" anymore.

Unless we will have a readable parent name for a resource favorite, we should just show the "path" property as it is. Plus, this is really an extreme case. You can not really make two favorites with same name unless you rename it later.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=0d8c608fa7eb44e5cf6496db1ae8e3f988043769
Comment 2 libing wang CLA 2012-02-09 14:25:41 EST
done.