This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have a trivial module which detects if the current LookAndFeel is Aqua and if so then installs Quaqua LooAndFeel. Quaqua is a proxy LaF which delegates most of its work to Aqua LaF but reimplements some controls to fix UI bugs in Apple Aqua LaF. The notable one is the file chooser. In essense what the quaqualaf module does is to have this piece of code in its ModuleInstall.restored() public void restored () { String laf = UIManager.getLookAndFeel().getClass().getName(); if ("apple.laf.AquaLookAndFeel".equals(laf)) { try { UIManager.setLookAndFeel( "ch.randelshofer.quaqua.QuaquaLookAndFeel"); } catch (InstantiationException ex) { ex.printStackTrace(); } catch (UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } catch (ClassNotFoundException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } } } This is similar to what Petr Nejedly did a while ago in his contrib/plafswitcher module except quaqualaf does it only for quaqua and includes quaqua.jar library. This module worked perfectly well in 4.0, 4.1 and probably all older versions of NB but does not work anymore in 5.0dev builds. We changed the startup sequence. The core now sets LaF after all ModuleInstall.restored() are called. Two points 1) this is compatibility breakage 2) it seems there is no way to achieve the same thing in 5.0: a module wants to package a LaF and sets it when the IDE is run. This was possible in all previous versions I'll attach the NBM and the code of quaqualaf module. On non-Mac platform this bug can be reproduced by a similar module which sets LaF to the non-default one in its ModuleInstall.restored(), ie to Metal on windows, motif or gtk on unix
Created attachment 26458 [details] Quaqua LaF module
Created attachment 26459 [details] quaqua LaF module sources
Yarda, as discussed... Radim, fyi, a potential startup sequence change.
Compatibility is important.
cvs -q ci -m "#67805: Initializing UI as soon as classloaders are ready" Checking in startup/src/org/netbeans/core/startup/Main.java; /cvs/core/startup/src/org/netbeans/core/startup/Main.java,v <-- Main.java new revision: 1.8; previous revision: 1.7 done Checking in startup/src/org/netbeans/core/startup/NbInstaller.java; /cvs/core/startup/src/org/netbeans/core/startup/NbInstaller.java,v <-- NbInstaller.java new revision: 1.20; previous revision: 1.19 I believe this is going to fix the problem. Milosi, can you try that on Mac with the attached NBMs?
yes it fixes the problem. quaqua LF gets installed.