aboutsummaryrefslogtreecommitdiffstats
path: root/swtmenubar/src-darwin/com/android/menubar/internal/MenuBarEnhancerCocoa.java
Commit message (Collapse)AuthorAgeFilesLines
* SDK: use prebuilts/devtools for swtmenubarRaphael Moll2013-01-151-341/+0
| | | | Change-Id: I776daa849cac4a277e1eed396e6fb7752d146a75
* SDK Manager: fix SWTMenuBar crash on MacOS X Mountain Lion.Raphaƫl Moll2012-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Use SwtMenuBar in HierarchyViewer application.Raphael Moll2011-04-281-3/+2
| | | | Change-Id: I5f61e0c238520d8582e9bef8fa69c354a1165475
* Use SwtMenuBar for DDMS.Raphael Moll2011-04-281-0/+4
| | | | Change-Id: I32121a336e5b3256ef1661fff5afe84741295d08
* Cocoa implementation for SwtMenuBar.Raphael Moll2011-04-271-0/+338
Note that in the Android SDK tools, we ship: - SWT in 32-bit with Carbon only. - SWT in 64-bit with Cocoa only. The previous implementation was carbon-only and the menus were basically not 'macified' when running on a recent Mac from the command-line. This missing implementation fixes it. After experimenting with various implementations of the original SWT CocoaMenuEnhancer, I finally settled with this one since it solely uses reflection and does not import anything from the swt.cocoa namespace. This means we can easily build this using the makefile which *only* links with the 32-bit/carbon version of SWT.jar. Note that on Windows/Linux, the src-darwin folder will be ignored, which is why it is not mapped as a source directory and which is why we can't build this directly from Eclipse. Change-Id: I53859d3b15bc7026d6bd4f77e048a0c4b4eeb02c