-
Notifications
You must be signed in to change notification settings - Fork 830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NETBEANS-1402] Added nb.laf.norestart system property to prevent restart on LaF changes #1056
[NETBEANS-1402] Added nb.laf.norestart system property to prevent restart on LaF changes #1056
Conversation
…tart on LaF changes
19d63c2
to
5a865cf
Compare
It will be part of NetBeans 11.1, right? |
@Chris2011 whether it's 11.1 or 12 it should be in the next release if it's in master. Somewhat intrigued by this addition, and how well it'll work - runtime LAF changes were somewhat flaky. (Also somewhat intrigued to be replying to a comment GitHub claims you're going to make 6 hours from now!) |
@neilcsmith-net sry, maybe I didn't see your comment or smth strange happened. I will give you some detail about my case with the LaF. First I see it in IntelliJ (I can compare it with NetBeans, because the UI is swing too) and VS Code (Not comparable but a nice feature). What I see is, someone is presenting smth and he has his own mode, dark for example. No one can read it properly, because of the light or the beamer or whatever (Not only the editor, but also the whole IDE, filenames, options, etc.) they switch LaF, hit apply and everything is immediately applied and changed to a new LaF. (maybe with some delay of 200ms or whatever). This is not possible in NetBeans. You can only change the editor theme w/o restart which is good but first it looks weird when the LaF is still the same as before and the contrast (dark/light) is also not nice. So when I switch the LaF I need to restart NetBeans. And NetBeans is not usable up until 30s (more or less, depends on OS, version, Scanner, etc.). So this is really not nice. I mean there could be a difference, between, restarting the whole IDE or refreshing the UI. I think a lot of stuff could be handled by refreshing the whole UI which is way better and acceptable. So this is why such a switch is needed. |
@Chris2011 I understand the reason why it's useful, but it may not work 100%. Just saying that updating the whole UI without restarting used to have visual issues due to caching (see eg. hack 1 in this old post https://praxisintermedia.wordpress.com/2011/09/29/the-dark-arts-of-netbeans-hackery/ ) Anyway, main point was to say if it's in master it will be in next release. Then can work out if there are still caching issues! 😉 |
Yes, still issues after changing the LaF w/o restarting it. It only reloads some parts but not the whole IDE. Still buggy with that option. I know that restart is needed for NetBeans but there need a rethink, because other IDEs can handle it too. Anyway, will create a new ticket for that. Thx for the help :) |
@Chris2011 yes, likely still requires something akin to the first hack in the post I linked - fully nuking the UIDefaults table? |
@neilcsmith-net what do you mean exactly? Maybe we should start a thread due to this. |
Added a way to enable in process LaF changes.
Just add -J-Dnb.laf.norestart=true to the netbeans launch options to test it.