#35 Class selection dialog doesn't appear in Eclipse 3.3+

build 1.3.39
open
Maxim Mazin
5
2008-09-18
2008-09-18
Inferno
No

Class selection dialog doesn't appear in Eclipse ver. 3.3 or later
Reproducing steps:
1. Create Unimod diagram
2. Add State Machine class to diagram
3. Add ControlledObject to diagram
4. Click on ControlledObject class name area and then click on drop-down button.

Expected result: Class selection dialog should open
Actual result: class name area loses its focus and nothing else happens

Discussion

  •  Inferno
    Inferno
    2008-09-18

    • milestone: --> build 1.3.39
     
  •  Inferno
    Inferno
    2008-09-18

    The reason of the issue is changed behaviour of the isFocusControl() method in Eclipse 3.3 (as described here http://dev.eclipse.org/newslists/news.eclipse.platform.swt/msg35825.html\).

    The issues resolves by changing the method focusLost of the anonymous FocusAdapter class in com.evelopers.unimod.plugin.eclipse.property.ClassCellEditor, like this:

    public void focusLost(FocusEvent e) {
    if (! dialogOpened) {
    final Object source = e.getSource();
    ClassCellEditor.this.getControl().getDisplay().asyncExec(new Runnable() {
    public void run() {
    if ((source == defaultText && browseButton != null && ! browseButton.isFocusControl()) ||
    (source == browseButton && defaultText != null && ! defaultText.isFocusControl())) {
    ClassCellEditor.this.focusLost();
    }
    }
    });
    }
    }

    Tested in 1.3.38 and Eclipse 3.3