| Summary: | GEF Editor Undo Error | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | jerlyn99 | ||||||
| Component: | GEF-Legacy GEF (MVC) | Assignee: | gef-inbox <gef-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | critical | ||||||||
| Priority: | P3 | CC: | mattscar, nyssen | ||||||
| Version: | 3.2 | ||||||||
| Target Milestone: | 3.6.0 (Helios) M6 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
jerlyn99
There is not enough information in this Bugzilla to investigate the issue. We need one of: An example demonstrating the issue. A failing JUnit test demonstrating the issue. A patch containing a fixes for the problem. Created attachment 58744 [details]
Screenshots
Shows the diagram before delete, after delete and after undo.
Ok to recreate the error: 1. Create a new Flow Diagram (GEF Plugin Example) 2. Clear the diagram 3. Put 4 new activities on diagram 4. Create connections between the 4 activities in the most complicated way you can where they are all inter-connected to each other 5. Using the ctrl-key select 3 connectors and 2 activities 6. Delete the 5 selected items at one go 7. Select undo option You can see that the undo action does not undo correctly, ie. does not undo to the state before deletion. 8. Further undo and the steps are all reverted incorrectly and even resulted in error printed below. I have attached screenshots for your viewing. Thank you. --------------------------------------- !ENTRY org.eclipse.ui 4 4 2007-02-12 10:09:55.229 !MESSAGE Unhandled event loop exception !ENTRY org.eclipse.ui 4 0 2007-02-12 10:09:55.245 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.draw2d.graph.Edge.<init>(Edge.java:164) at org.eclipse.gef.examples.flow.parts.TransitionPart.contributeToGraph(TransitionPart.java:108) at org.eclipse.gef.examples.flow.parts.ActivityPart.contributeEdgesToGraph(ActivityPart.java:74) at org.eclipse.gef.examples.flow.parts.ActivityPart.contributeEdgesToGraph(ActivityPart.java:78) Created attachment 74469 [details]
Patch to remove error in Flow Example Activity.java
This patch forces Activity objects to check whether the Transition being added is already one of its Transitions.
When you delete an Activity and one of its Transitions, the Transition will be deleted twice. If you undo the deletion, the Transition will be added twice. I think that's what's causing the error. My patch (and it's my first, so be patient) forces each Activity to check whether a Transition added to an Activity is already one of the Activity's Transitions. On my system, this gets rid of the loop exception. I am not able to reproduce this issue under GEF 3.6M6, thus I am closing it as resolved fixed. If somebody can provide steps to still reproduce this issue, please reopen. Comment on attachment 74469 [details]
Patch to remove error in Flow Example Activity.java
This patch has not been applied, so marking it as obsolete.
|