|
The bug happens when the SDK Manager is open using the embedded
class from within Eclipse 4.2 -- the SWT used is then the newer
3.7 which doesn't have the same cocoa interface for menus.
The fix is threefold:
- If the cocoa enhancer fails, revert to the generic one. This doesn't
quite help here since the crash is actually when the native handler
is invoked but the setup is fine.
- Implement a new enhancer on top of the newer SWT 3.7 APIs that lets
us access the About and Preference menus on Mac. That was the whole
point of the enhancer workaround since SWT 3.5 an 3.6 don't have
access to these menus directly. This new enhancer is used if SWT
version 3700+ is used on Mac.
- Finally the crash only happens when using the embedded version of the
SDK Manager within ADT. When possible this uses the forked
standalone version. It will still revert to the embedded one if ADT
is started without any tools.
The new enhancer for 3.7 on Mac is sub-optimal: since it *adds*
a listener to the about/preference Mac menus, that means when it is
invoked from within Eclipse these menus will generate 2 events,
e.g. bringing both the Eclipse preferences and then the SDK Manager
preferences. To support this case properly, we should detect this
runs from within Eclipse, not change the about menu and instead
integrate the sdk manager pref as a panel in eclipse's prefs. A
cheaper workaround is to revert to the default generic enhancer
that will create an options menu. Maybe for a later CL.
SDK Bug: 38640
Change-Id: Ib1588e401616548a5dc9eb216d3c35b579d3950b
|