Re: startup edit works only when run from ide

Mark Wade <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
When I first read Tim's response to my post I thought I can do that but 
when I went about it I realized how much I don't know and how much I 
have to learn.

First, rather than edit an existing class and rebuilding netbeans as I 
first did, I created a module with a static method and called that 
method from a ModuleInstall restored() method and installed it all as a 
plugin.  That seemed a proper way to go about what it is I'm trying to do.

However, when it came to adding a runtime dependency on core.swing.plaf 
I haven't been able to find that.  The closest I came up with is 
org.netbeans.swing.plaf so I gave that a try and that works, to a 
fashion.  It works in the netbeans 8.1 I built but not in the pre-built 
netbeans 8.1 and only if I set the lookandfeel from netbeans options, 
not if I specify with the --laf flag.

So I'm still not editing UIDefaults at the proper time. Can someone 
point me to where to find core.swing.plaf or explain what it is and 
maybe comment on how I went about doing it?

Thanks,

-- Mark

On 01/08/2016 11:54 PM, Tim Boudreau wrote:
> Your change in UIDefaults is getting clobbered on startup.
>
> core.swing.plaf sets the look and feel and initializes a bunch of 
> stuff in UIDefaults.  Set your module to have a runtime dependency on 
> it, so you ensure your code gets run after the look and feel is set 
> (which will nuke anything you did to UIDefaults) and after anything 
> code in there might do to the thumb size.
>
> -Tim
>
>
> On Fri, Jan 8, 2016 at 1:57 PM, Mark Wade <[email protected] 
> <mailto:[email protected]>> wrote:
>
>     Hello,
>
>     I've been playing around building NetBeans and although what I'm
>     doing is all kind of silly, still I would like to figure it out,
>     I'm at a bit of a loss and was hoping someone might shed some
>     light on my predicament.
>
>     There seems to be a bug in the Nimbus LnF implementation or maybe
>     its the JRE but after java version 1.8.0_51 on large files after
>     reaching a minimum size the scroll bar thumbs disappear, they
>     still work but kind of hard to find when they can't be seen. 
>     There is a workaround setting the minimum size of the thumb in the
>     UIDefaults dictionary which I've added into
>     org.netbeans.core.startup.Main.main after checking for Nimbus LnF:
>
>     javax.swing.UIManager.getLookAndFeel().getDefaults().put("ScrollBar.minimumThumbSize",
>     new java.awt.Dimension(30, 30));
>
>     For better or for worse but it does work if I run the Startup
>     module from a running instance of NetBeans.  If I run my built
>     netbeans/bin/netbeans directly it does not.
>
>     Why?
>
>     -- Mark
>
>
>
>
> -- 
> http://timboudreau.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.