I added this code to make the OS X version look more native. It is
still usable and runnable inside Eclipse (preferences, about, and quit
all work, they are just under the application menu). This seemed
reasonable for a development process setup to me. I'm not sure moving
the code out will be more beneficial -- you'd either have to entirely
duplicate the menu creation code or go remove things afterwards that
you don't want. This would add more clutter than just conditionally
not adding the menu items in the first place.
Unless I'm missing something ...
Thanks,
/dev/mrg
On Jan 8, 2008 8:14 AM, Andrus Adamchik <andru..bjectstyle.org> wrote:
> 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 - 09:27:40 EST