Bug 257324 [Mac] Menu items "About Eclipse SDk" and "Preferences" of Top menu "Eclipse" not disable after show the dialog of "About Eclipse SDK"
Build ID: M20071023-1652 Steps To Reproduce: 1. Launch Eclipse on MAC, and open the dialog of "About Eclipse SDK" by [Eclipse]->[About Eclipse SDK] 2. Click the [Eclipse] top menu, open the [Eclipse] top menu 3. The menu items [About Eclipse SDK] and [Preferences] still enable click, them should be disable. More information:
bundles/org.eclipse.ui.carbon/src/org/eclipse/ui/internal/carbon/CarbonUIEnhancer.java
* See Apple Technical Q&A 1079 (http://developer.apple.com/qa/qa2001/qa1079.html)
     */
    private void hookApplicationMenu(Display display) {
        
        Object target = new Target();
        final Callback commandCallback = new Callback(target, "commandProc", 3); 
        int commandProc = commandCallback.getAddress();
        if (commandProc == 0) {
            commandCallback.dispose();
            return; 
        }
        
        int[] mask = new int[] { OS.kEventClassCommand, OS.kEventProcessCommand };
        OS.InstallEventHandler(OS.GetApplicationEventTarget(), commandProc,
                mask.length / 2, mask, 0, null);
        
        int[] outMenu = new int[1];
        short[] outIndex = new short[1];
        if (OS.GetIndMenuItemWithCommandID(0, kHICommandPreferences, 1, outMenu, outIndex) == OS.noErr
                && outMenu[0] != 0) {
            int menu = outMenu[0];
            
            int l = fAboutActionName.length();
            char buffer[] = new char[l];
            fAboutActionName.getChars(0, l, buffer, 0);
            int str = OS.CFStringCreateWithCharacters(OS.kCFAllocatorDefault, buffer, l);
            OS.InsertMenuItemTextWithCFString(menu, str, (short) 0, 0, kHICommandAbout);
            OS.CFRelease(str);
            
            if (fHideActionName != null) {