Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 166247 - Incorrect placement of dropped node
Incorrect placement of dropped node
Product: platform
Classification: Unclassified
Component: Nodes
All All
: P3 (vote)
: 6.x
Assigned To: Jaroslav Tulach
Depends on:
  Show dependency treegraph
Reported: 2009-05-29 12:10 UTC by toker5
Modified: 2010-04-27 04:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT

Sample Platform application that demonstrates the bug (16.61 KB, application/octet-stream)
2010-04-26 09:00 UTC, toker5
A video demonstrating the bug (20.43 KB, application/octet-stream)
2010-04-26 09:11 UTC, toker5
A video demonstrating the bug (6.03 MB, application/octet-stream)
2010-04-26 09:19 UTC, toker5

Note You need to log in before you can comment on or make changes to this bug.
Description toker5 2009-05-29 12:10:37 UTC
This problem is best described by the following drag and drop scenario:

Node "Source" is the dragged node.
Node "Target" is the target node which contains several child nodes. It's children factory implements Index, so
positioning is supported in drag and drop operations.

Case 1:
If Source is dropped directly onto Target, without moving over the child nodes of Target, then Source is correctly
positioned at the end of the child list of Target.

Case 2:
If Source is dropped between two of the child nodes of Target, then Source is also correctly positioned.

Case 3 (problem):
If Source is moved over the child nodes of Target, then dropped directly on Target, then Source is _incorrectly_
positioned at the last hovered "in between" drop location.

In the last case, the same result as in the first case is expected.
Comment 1 toker5 2010-03-02 01:04:56 UTC
Verified that this bug is still present in NetBeans 6.8.
Comment 2 Stanislav Aubrecht 2010-03-17 13:01:00 UTC
which component are you referring to? generic tree or treetable/outline or other?
Comment 3 toker5 2010-03-17 13:08:09 UTC
TreeView. Haven't tested in the OutlineView.
Comment 4 Jesse Glick 2010-03-18 23:16:25 UTC
Originally reported in 6.5, and assumed to be valid thereafter. (Version fields may be pushed back but should not be pushed forward.)
Comment 5 Jaroslav Tulach 2010-04-23 16:40:04 UTC
I tested it in Files view and I don't see any behavior like this. What is the component that you are demonstrating the usecases? Can you provide sample module that I can run?
Comment 6 toker5 2010-04-26 09:00:25 UTC
Created attachment 98002 [details]
Sample Platform application that demonstrates the bug

The sample code consists of the following:

A simple object that is hierarchical.

A Node implementation for MyObject that provides an Index cookie and drag-drop-support.

A Index.KeysChildren implementation for MyObject.

Opens up a set of nodes in a BeanTreeView that lets you reproduce the bug.
Comment 7 toker5 2010-04-26 09:11:26 UTC
Created attachment 98004 [details]
A video demonstrating the bug

This is a video demonstrating the bug. Notice that while dragging the selected node, I stop by the indexed position between MyObject 4 and 5, leave the tree with the mouse pointer, then enter the parent node of 4 and 5 and drop it directly there. The expected behavior would be to append the node to the end of the list, but the node is instead inserted at the last visited indexed position.
Comment 8 toker5 2010-04-26 09:19:52 UTC
Created attachment 98005 [details]
A video demonstrating the bug

Uploaded the correct video.
Comment 9 Jaroslav Tulach 2010-04-26 09:36:51 UTC
Shall be better now with core-main#2f3ce070175f
Comment 10 Jaroslav Tulach 2010-04-26 09:40:03 UTC
Btw. I cannot see the video.
Comment 11 toker5 2010-04-26 10:00:22 UTC
Did you try the updated attachment? (i accidentally uploaded the wrong video first)
Comment 12 Quality Engineering 2010-04-27 04:27:41 UTC
Integrated into 'main-golden', will be available in build *201004270201* on (upload may still be in progress)

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