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 110981 - Better behavior of FileUtil.setOrder
Summary: Better behavior of FileUtil.setOrder
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 103187
  Show dependency tree
 
Reported: 2007-07-25 17:09 UTC by Jesse Glick
Modified: 2008-12-22 13:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2007-07-25 17:09:17 UTC
FU.sO should try harder to avoid changing existing positions. In particular, the following code ought not change any
existing position attributes:

List<FileObject> kids = FileUtil.getOrder(Arrays.asList(d.getChildren());
kids.add(d.createData("x"));
FileUtil.setOrder(kids);
Comment 1 Jesse Glick 2007-10-17 23:42:02 UTC
Fixed this case at least, and verified by adding a new menu (or menu item or separator) in Advanced Options.

Checking in src/org/openide/filesystems/Ordering.java;
/shared/data/ccvs/repository/openide/fs/src/org/openide/filesystems/Ordering.java,v  <--  Ordering.java
new revision: 1.8; previous revision: 1.7
done
Checking in test/unit/src/org/openide/filesystems/OrderingTest.java;
/shared/data/ccvs/repository/openide/fs/test/unit/src/org/openide/filesystems/OrderingTest.java,v  <--  OrderingTest.java
new revision: 1.8; previous revision: 1.7
done