Community
Participate
Working Groups
Problem in DragEditPartsTracker when the grid is visible. To reproduce the problem in the Logic example, modify LogicXYLayoutEditPolicy.createChildEditPolicy(). Right after the policy is created, add the line policy.setDragAllowed(false); Now try dragging an element in the Logic editor; you should encounter a NullPointerEx in DragEditPartsTracker.updateTargetRequest(). With the SnapToHelper enabled, the drag tracker tries to use the variable 'compoundSrcRect'. This variable is set based on any selected editparts that understand the move request. However, the setDragAllowed(false) call means that the editpolicy doesn't understand the request, so the variable in question is never set.
Created attachment 25857 [details] Patch for DragEditPartsTracker A simple fix for 3.1.1 is to not get the snapToHelper from the target editpart if there is nothing to be dragged. Then the code where the NPE occurs won't be entered for this case. The more correct fix would be to not enter into drag state if there's nothing to be dragged. We can do that for 3.2, but it's too risky for 3.1.1. I'll open another bug for that. Randy to approve the attached patch.
+1
fixed
*** Bug 110944 has been marked as a duplicate of this bug. ***
Bug 106411 was opened to consider a better fix for this problem in 3.2.
*** Bug 71392 has been marked as a duplicate of this bug. ***
Comment on attachment 25857 [details] Patch for DragEditPartsTracker Remove iplog+ flag as contributor was committer (who applied the change).