From: SourceForge.net <no...@so...> - 2005-05-09 16:55:12
|
Bugs item #1198420, was opened at 2005-05-09 11:55 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1198420&group_id=44253 Category: UI: MacOS X-specific Group: None Status: Open Resolution: None Priority: 5 Submitted By: Dan Smith (dlsmith) Assigned to: Nobody/Anonymous (nobody) Summary: Java 5.0 Support on Mac OS X Initial Comment: Running DrJava under Mac OS 10.4 with Java 5.0 exposes some bugs in the platform-specific code. The edu.rice.cs.drjava.platform.PlatformFactory class recognizes the system as OS X, but does not recognize the Java version, so it uses a generic MacPlatform instance. Unfortunately, the edu.rice.cs.drjava.platform.MacPlatform class does not correctly implement the isMacPlatform() method. As a result, the default LAF is not set to the Apple LAF (in contrast to the behavior under a Mac13Platform or a Mac14Platform). Additional code in the Mac14Platform class applies as well under Java 5.0, and not using it exposes other incosistencies (quitting the application is buggy; the DrJava menu bar does not get moved to the top of the screen). **************** Recommended fix: The Mac13Platform is now irrelevant, and we don't need to distinguish between 1.4 and 5.0, so the mac-specific code should all be collapsed to rely on a single MacPlatform class. The few references to isMac13Platform() and isMac14Platform() in the code base should be replaced by isMacPlatform(), and the MacPlatform class itself should contain all the code in the current Mac14Platform class. PlatformFactory can simply rely on the "os.name" property to determine if the system is a Mac ("mac os x" is the expected lowercase value prefix; "mrj.version" is deprecated; see <http:// developer.apple.com/technotes/tn2002/tn2110.html>). The following changes should also be made to the DrJava.app package (in the src/edu/rice/cs/drjava/packaging directory), mostly to fix deprecated 1.3 code in Contents/Info.plist: - JVMVersion in Info.plist should be changed from "1*" to "1.4+" indicating that (at least) Java 1.4 is required (see <http:// developer.apple.com/documentation/Java/Conceptual/ JavaPropVMInfoRef/Articles/JavaDictionaryInfo.plistKeys.html>; "1*" isn't listed as a valid option). - The Java properties list in Info.plist can be removed. "com.apple.mrj.application.live-resize" and "com.apple.macos.useScreenMenuBar" are deprected, and the equivalent property for the menu bar is set in our code, so doesn't need to be set here. (See <http://developer.apple.com/ releasenotes/Java/java141/system_properties/ chapter_4_section_3.html> for a list of valid system-specific properties.) - CFBundleIconFile should be changed from "GenericJavaApp.icns" to "DrJava.icns"; a new version of the DrJava icon (with 3D shading) should be placed in the package, and the current GenericJavaApp.icns should be deleted (the use of "GenericJavaApp" as the icon file name is inherited from the template Info.plist file, and nobody ever bothered to fix it). Finally, the DrJava application will only run under 5.0 if the user makes 5.0 the preferred JVM (this is *not* done when 5.0 is installed). As an alternative, the application package could be marked to require 5.0 (using "JVMVersion"), but then it would only run under 5.0, which isn't what we want. Some DrJava documentation explaining how to change the preferred system JVM would be useful. Users just need to run "/Applications/ Utilities/Java/J2SE 5.0/Java Preferences" and, under "Java Application Runtime Settings", move "J2SE 5.0" to the top of the list. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1198420&group_id=44253 |