Project

General

Profile

Bug #4093

allow kepler to use OS specific UI elements

Added by Chad Berkley over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Immediate
Assignee:
Category:
build system
Target version:
Start date:
05/20/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4093

Description

I've implemented an extension point in kepler to allow us to build OS specific UI tweaks into kepler without breaking the build on other OS. Any module can now have a modules-info/osextension.txt file. The file has two properties: an OS that the extension runs on and a class that implements org.kepler.OSExtension. The interface OSExtension has only one method addOSExtensions() which allows the implementing class to do any tweaks necessary at startup time.

The example use case is for OSX. We want kepler to look like a native OSX application. The only way to do that is to use some OSX specific classes that do not exist on windows or linux (hence any classes that depend on those break the build for other OSs). The way this now works is there is a suite called kepler-mac which has the same modules as kepler, but adds the appleExtension module. The appleExtension module includes an implementation of OSExtension plus the osextension.txt file. The osextension.txt file looks like this:

class=org.kepler.osx.KeplerOSXExtension
os=Mac OS X

When Kepler starts up, it checks all modules for the osextension.txt file. It then looks at the current OS to see if the name java returns matches the OS name in osextension.txt. If it does, it attempts to load the class defined in the .txt file and run the addOSExtensions() method.

If you want to use the mac osx extensions, simply do 'ant change-to -Dsuite=kepler-mac' and re-compile. You should see the native OSX menu bar instead of the normal java one.

Additional tasks for the OSX extension is to add the about box into the Applicaiton menu and to make the apple-q ask if you want to save before terminating. Also need to fix the icon in the dock.

History

#1 Updated by Chad Berkley over 10 years ago

fixed the about box. fixed apple-q. The icon shown is now the java icon. Will try to get the kepler icon to work.

#2 Updated by Chad Berkley over 10 years ago

fixed. osx kepler now has a new icon set that fit the standard osx icon sizes. please open new bugs for any new Mac OSX issues you find.

#3 Updated by Redmine Admin over 6 years ago

Original Bugzilla ID was 4093

Also available in: Atom PDF