This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244568 - Navigator doesn't order CSS Ids alphanumerically
Summary: Navigator doesn't order CSS Ids alphanumerically
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: CSL (API & infrastructure) (show other bugs)
Version: 8.0
Hardware: PC Windows 8 x64
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-17 22:15 UTC by rasamassen
Modified: 2016-07-07 15:22 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rasamassen 2014-05-17 22:15:19 UTC
In the navigator window, CSS Ids are ordered alphabetically, but not alphanumerically. Currently, when a document uses Ids with numbers, to find the number 5, the user must look after numbers 47, 48, and 49.

Likely alphanumeric sort wasn't considered because this feature is located under CSS, and CSS Ids can't start with a number (though they are allowed to contain numbers). But Ids are still a useful feature in HTML navigation. Many documents use Ids for this purpose.

See http://www.w3.org/TR/html5/dom.html#the-id-attribute for the HTML5 description of Ids, where it clearly notes numeric Ids as valid.

Alphanumeric sort is simple, and would be a worthwhile feature to implement in the navigator. Other windows, like the projects window and files window, already use alphanumeric sort in the trees they create.

I imagine other areas of the navigator window could take advantage of alphanumeric sort as well, but the CSS Ids is the place where I noticed the issue.
Comment 1 Marek Fukala 2014-07-28 08:49:49 UTC
The sorting is provided by CSL infrastructure. o.n.m.csl.navigation.ElementNode$Description.ALPHA_COMPARATOR
Comment 2 Milutin Kristofic 2014-08-01 10:02:46 UTC
The projects window and file window doesn't use alphanumeric sort.

Try to create two files:
t25.txt
t3.txt

They are sorted as mentioned above, not alphanumerically.

It is a quite unusual approach, I haven't seen this in OS file navigators, ... I leave this as an possible enhancement.
Comment 3 rasamassen 2014-08-01 12:22:19 UTC
Microsoft started using alphanumeric sort (simply called numerical sorting in the policy editor) in Windows 7 and continues it in Windows 8. It has been a welcome improvement. So if you're looking for an OS file browser that does it, Windows Explorer does.

I don't use Macs, but Apple's support documents say Finder also sort numerically in Mac OS X. So both major OS file navigators on the market do use alphanumeric sorting.
Comment 4 Marek Fukala 2014-08-01 12:27:38 UTC
I can confirm they appear in the alphanumeric order in Mac's finder.
Comment 5 Milutin Kristofic 2014-08-01 12:34:02 UTC
Ok, my mistake, ubuntu file manager nautilus is also using alphanumeric sort. Still this isn't yet used in any case in Netbeans. I don't know if we want to introduce this new sort technique in csl navigator. I don't think it is good idea to implement such thing ad-hoc, but it should be implement at all alpha sorts together.
Comment 6 Vladimir Riha 2014-08-01 13:10:36 UTC
I asked for that with regards to PHP Navigator some time ago as well, but didn't really insist on it. Issue 209790 :)
Comment 7 Martin Balin 2016-07-07 07:32:01 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 8 rasamassen 2016-07-07 15:22:02 UTC
Bug remains in the 8.2 nightly for 201607070002.

Window=>Projects and Window=>Files, as well as Window=>Navigator=>CSS=>Ids and I'm sure many other places in the left panes, still do not sort alphanumerically.

Expected sort:
3.php
6.php
9.php
10.php
11.php
11a.php
12.php
30.php

Actual sort:
10.php
11.php
11a.php
12.php
3.php
30.php
6.php
9.php

Multiple people confirmed in this bug that all file managers on the major operating systems now sort alphanumerically. It would be nice if NetBeans got on board.