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 77328 - Add a reorder() method to efficiently reorder child components
Summary: Add a reorder() method to efficiently reorder child components
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Model (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 81620 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-02 19:09 UTC by Nathan Fiedler
Modified: 2011-11-27 19:30 UTC (History)
0 users

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 Nathan Fiedler 2006-06-02 19:09:30 UTC
Presently the schema editor supports the notion of reordering the children of a
component node. This change is affected in the model by copying the children,
reordering them in a list, removing the originals from the model, and adding the
copies in the new order. This is inefficient since it creates copies of all of
the nodes, which is necessary because XDM does not allow re-parenting nodes.

A better solution would be to permit reordering of child components in the
schema model. This reorder method would take a List representing the component's
children in the new order. The reorder method should verify that all of the
children are listed to ensure that the only change occurring is their order.

Ideally the undoable edit to represent this change would be all-inclusive, in
that it would be a single (compound) edit to represent the reordering, although
this may be unnecessary.
Comment 1 Nam Nguyen 2006-08-07 07:56:05 UTC
*** Issue 81620 has been marked as a duplicate of this issue. ***