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 178301

Summary: Add support for children reordering
Product: debugger Reporter: Martin Entlicher <mentlicher>
Component: CodeAssignee: Martin Entlicher <mentlicher>
Status: CLOSED FIXED    
Severity: normal Keywords: API, API_REVIEW_FAST
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 178079    
Attachments: ReorderableTreeModel and ReorderableTreeModelFilter introduced. Test included.
A simple API change for Watches reordering. Test included.

Description Martin Entlicher 2009-12-08 08:01:58 UTC
TreeTableView Model should create nodes that have an implementation of o.o.n.Index in their Lookup and thus allowing reorder of child nodes.
This is necessary for Drag and Drop to be able to reorder the children.
Comment 1 Martin Entlicher 2009-12-08 10:20:13 UTC
Created attachment 92291 [details]
ReorderableTreeModel and ReorderableTreeModelFilter introduced. Test included.
Comment 2 Martin Entlicher 2009-12-08 10:21:09 UTC
Created attachment 92292 [details]
A simple API change for Watches reordering. Test included.
Comment 3 Martin Entlicher 2009-12-08 10:28:58 UTC
Please review this API change that adds ability to reorder nodes in debugger views. Together with enhancement #177506 it allows to change order by Drag and Drop.

Two new models are introduced: ReorderableTreeModel and ReorderableTreeModelFilter. Ideas for a nicer name are welcomed.
When ReorderableTreeModel.canReorder() returns true, the created Node contains o.o.nodes.Index in it's Lookup.
Unit test is included.

In order to change order of Watches, a simple API change in DebuggerManager is added - two new methods: createWatch(int index, String expr) and reorderWatches(int[] permutation).
Unit test is also included.
Comment 4 Martin Entlicher 2009-12-14 08:38:21 UTC
Thanks for the review, I'll push the change tomorrow.
Comment 5 Martin Entlicher 2009-12-15 09:56:04 UTC
The APIs added in changeset:   155793:3ed2fed94090 and changeset:   155794:43db124d472c
http://hg.netbeans.org/main/rev/3ed2fed94090
http://hg.netbeans.org/main/rev/43db124d472c
Comment 6 Quality Engineering 2009-12-16 12:14:32 UTC
Integrated into 'main-golden', will be available in build *200912161400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/3ed2fed94090
User: mentlicher@netbeans.org
Log: #178301 - Added createWatch(int index, String expr) and reorderWatches(int[] permutation) methods into DebuggerManager
Comment 7 Marian Mirilovic 2010-05-18 09:28:20 UTC
v/c