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.
excerpt from projects-dev: Jan Pokorsky wrote: > > Pavel Buzek wrote: > > The documentation of Filesets api says that the mutable filesets created > > with the following factory methods preserve order. > > > > FileSets.createFileObjectSet(boolean, ReferenceResolver) > > FileSets.createDataObjectSet(boolean, ReferenceResolver) > > > > Right. > > > On the other hand there is pretty poor support for reordering them. To > > do an equivvalent of add(int index, Object o) you have to remove all > > items and add them again in the right order. Would not it be better to > > provide an additional interface with methods that are in java.util.List? > > Namely: > > > > void add (int index, Object o); > > int indexOf (Object o); > > int lastIndexOf (Object o); > > Object set (int index, Object o); > > List subList (int indexFrom, int indexTo); > > Object remove (int index); > > > > Thanks, > > -pavel > > > > In time of collecting requirements there were no such requirements. We > agreed thet keeping the order is enough. That's the reason. > > Now you have still a possibility to extend the MutableFileSet with > required methods on your own and keep a permutation info. > > As a better alternative, if others agree, we could improve the api as > you suggested. So far I have received a second complaint about the > missing reordering functionality. I would propose to add the whole set > of methods by implementing the interface java.util.List. The > MutableFileSet would consist of all List's methods + current > addAll(FileSet), removeAll(Content) and you get moreover all benefits of > Collections API like sorting, ... > > Jan
Done.
i've verified all these issues
closing all my verified issues