Separating mac modeler code

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jan 08 2008 - 08:14:28 EST

  • Next message: Michael Gentry: "Re: Separating mac modeler code"

    Just realized that when running Modeler from Eclipse on Mac, I have a
    bunch of functions absent from the menu, due to this code in
    CayenneModelerFrame.java:

           // Mac OS X doesn't use File->Exit, it uses CayenneModeler-
    >Quit (command-Q)
            if (!SystemUtils.IS_OS_MAC_OSX) {
                fileMenu.addSeparator();
                 
    fileMenu.add(getAction(ExitAction.getActionName()).buildMenu());
            }

            // Mac OS X has it's own Preferences menu item under the
    application menu
            if (!SystemUtils.IS_OS_MAC_OSX) {
                toolMenu.addSeparator();
                 
    toolMenu
    .add(getAction(ConfigurePreferencesAction.getActionName()).buildMenu());
            }

            // Mac OS X "About CayenneModeler" appears under the
    application menu, per Apple GUI standards
            if (!SystemUtils.IS_OS_MAC_OSX)
                 
    helpMenu.add(getAction(AboutAction.getActionName()).buildMenu());

    It would be nice if we could refactor this code to move all Mac
    specific logic into the "modeler/cayenne-modeler-mac-ext" module...
    (not only to make it runnable from Eclipse, but also to separate
    platform-specific logic from the modeler core). Anybody wants to look
    at this?

    Thanks
    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Jan 08 2008 - 08:15:00 EST