Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 371108

Summary: OpenResourceDialog showing identical favorites names.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: susan
Version: 0.4   
Target Milestone: 0.4 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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.