Bug 290747 - [common navigator] Non-IResource items in Project Explorer breaks sort order
Summary: [common navigator] Non-IResource items in Project Explorer breaks sort order
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2009-09-28 16:30 EDT by Mark Melvin CLA
Modified: 2009-10-06 10:48 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Melvin CLA 2009-09-28 16:30:59 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.21 Safari/532.0
Build Identifier: I20090611-1540

As outlined in this newsgroup posting:

http://www.eclipse.org/forums/index.php?t=msg&th=153889&start=0&S=6900ec79b045b78425ab3822d0a6845c

I have a common navigator contribution to the Project Explorer view that creates a 
virtual node in the Project Explorer, for simplicity's sake - like so:

Project
+-Folder1
+-Folder1
+-aFile.ext
+-My Item

The problem is, I want my item to appear first in the list. I figured 
this would be as simple as changing the priority to 'high'. Well, that 
does move my item to the top of the list, but it appears to hose the sort 
order of the Project Explorer. Now I get this:

Project
+-aFile.ext
+-My Item
+-Folder1
+-Folder1

So it appears to be sorting alphabetically now, instead of using the 
normal resource-based sorting (Folders first, then files).  

Now, interestingly enough upping my priority to 'higher' has caused my item to 
be at the very top, *and* the normal resource-based sort behavior has been 
restored.

Further fiddling makes it seem like there is an issue with the JDT's content provider.  If I disable the JDT's "Java Elements" contribution, the sorting is never messed up no matter which priority I set my contribution to be.


Reproducible: Always

Steps to Reproduce:
(See above)
Comment 1 Dani Megert CLA 2009-09-29 02:35:59 EDT
Does it still happen with 3.5.1 or 3.6 M2? We fixed some a very similar sorting issues there. If it still happens there please attach a test case/plug-in.
Comment 2 Dani Megert CLA 2009-10-06 02:52:26 EDT
Nothing we can do without more info.
Comment 3 Mark Melvin CLA 2009-10-06 10:48:01 EDT
This appears to no longer be an issue in 3.5.1.