Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 110981 - Better behavior of FileUtil.setOrder
Better behavior of FileUtil.setOrder
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Filesystems
6.x
All All
: P3 (vote)
: 6.x
Assigned To: Jesse Glick
issues@platform
:
Depends on:
Blocks: 103187
  Show dependency treegraph
 
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
:


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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo