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

Summary: Better behavior of FileUtil.setOrder
Product: platform Reporter: Jesse Glick <jglick>
Component: FilesystemsAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 103187    

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