Community
Participate
Working Groups
Build Identifier: 20100218-1602 If you edit a text label via direct edit and cancel by using the escape key, that label can no longer be edited. Neither clicking in the label nor using F2 will enable direct edit for that label. Reproducible: Sometimes Steps to Reproduce: The Galileo Modeling SR2 download can reproduce this problem. Use the geoshapes example that comes with GMF. Create a shape on a diagram with a label (e.g., an oval with label "abc"). Click select the label to enter direct edit mode. Press the escape key to cancel the edit and exit direct edit mode. The label can no longer be edited via direct selection or using F2. This problem happens 95% of the time when I use my GMF-based diagram. But the geoshapes example is the easiest way for someone else to reproduce it. In the geoshapes example, the problem doesn't happen every time, but for some reason, having a short label of 2-3 characters and using an oval make it happen more often, at least for me. The problem appears to be a null pointer exception in SWT's Display class that occurs as a result of the call getCellEditor().dispose() in method bringDown on line 115 of DirectEditManager. The NPE occurs in the method fieldEditorProc in class Display on the line return widget.shouldChangeTextInRange_replacementString(id, sel, arg0, arg1) ? 1 : 0; The variable "widget" is null. The only workaround is to save, close and re-open the diagram. The problem also occurs when using GMF's logic example with a note. It does not happen if I use GEF's logic example, although both go through the same logic in class DirectEditManager. GMF has its own TextDirectEditManager and TextCellEditorEx class, so it may be the way GMF interacts with SWT. I can't reproduce the problem on Windows, so it appears to be Mac only for now. I'm running Mac OSX Snowleopard on a 64 bit Mac.
Created attachment 172389 [details] Stack trace of null pointer exception location
I've done some preliminary testing with Helios RC4 and the problem has not yet occurred. So something has changed between Galileo SR2 and Helios.
It's hard to say what exactly changed to fix the problem. 3.5.2 to 3.6 RC 4 was a pretty long time -- could have been SWT or GEF. Bug 259181 removed Display.fieldEditorProc, so it's possible that it was fixed as a side effect of that.
(In reply to E. Waldin from comment #2) > I've done some preliminary testing with Helios RC4 and the problem has not > yet occurred. So something has changed between Galileo SR2 and Helios. According to above comment, problem is fixed in Helios (3.6).