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: To 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 162263 [details] Stack trace of null pointer exception location I've attached a stack trace of where the NPE occurs in Display.
[GMF Restructure] Bug 319140 : product GMF and component Runtime Diagram was the original product and component for this bug