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.
Hi Editor team, I'm asked from community folks how to customize some settings about editor e.g. "Line Height Correction" on 6.5, these detail editor options could be customized before on advanced option. When I checked the UI spec, http://ui.netbeans.org/docs/ui/options2/, "Line Height Correction" will be on "Advanced" tab of Editor option, but currently it's not provided. Will this be implemented? I'm sorry I could not find the exact bug report for this, if it has been already filed, please mark this bug report as dup of the original one. Thanks.
there is temporal workaround available: add following code to the file: {userdir}/config/Editors/text/x-java/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml <entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve"> <value><![CDATA[2.0]]></value> </entry>
Masaki, why exactly do they need to customize this?
Thanks for evaluation and workaround. OK, I'll ask them to add their comments here.
Oh, as for the workaround it might be better to use the 'all languages' file, which is: {userdir}/config/Editors/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml
Btw, any reasonable reference for these preference key and value? I found these docs but if you have, please let me know. http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-settings/constant-values.html http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-settings/org/netbeans/api/editor/settings/SimpleValueNames.html
vstejskal, For whatever it's worth, my experience is that line height correction is most useful when reducing font sizes. For example, if you adjust the default font to monospaced 11 (or 10), you'll see that the amount of white space between the lines increases noticeably. For my eyes - at 1900x1200 - monospaced 11 with a 0.8 correction is about right. Presumably the line height correction feature would also be useful if people are running at different resolutions and adjusting the font to be even smaller (or larger) than default. Anyway, thanks for the temporary fix! - Nathan
I'm having a similar issue, not sure if it's related. I'm on Ubunbtu 8.10, and using the dev builds (currently 200902091451). My line height changed after build 200901061401, without any actual changes to my system. The size seemed to double, resulting in a lot of space between the lines, while still having the same font size. I've done the suggested change below, but this has made the editor look weird. Now a highlighted line is only 1/2 height, with a lot space below the line. Editing text results in the text being cut off the top, which comes right after I stop typing. It seems to me that the line height calculation is confused as to what the actual font text height is. ANy help would be appreciated. I've attached a screen shot to this issue. Cheers, Cameron.
Created attachment 76821 [details] Weird line height issue (set to 0.6)
Ok, an additional note... my line issue seemed to be due to use OpenJDK instead of the official Sun JDK.
I'm having a problem related to this on Linux: ( Product Version: NetBeans IDE 6.9 (Build 201006101454) Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01 System: Linux version 2.6.22.14-72.fc6 running on amd64; ISO-8859-1; en_CA (nb) Userdir: /var/local/space/.netbeans/6.9 Redhat Fedora 3.5.8 ) Whenever I add this "entry" tag to a "CustomPreferences.xml" file manually, I end up with a non-bootable NetBeans installation. I get the following exception in "messages.log" ( java.lang.UnsatisfiedLinkError: no splashscreen in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50) at java.security.AccessController.doPrivileged(Native Method) at java.awt.SplashScreen.getSplashScreen(SplashScreen.java:91) at org.netbeans.core.startup.Splash.<init>(Splash.java:140) at org.netbeans.core.startup.Splash.getInstance(Splash.java:103) at org.netbeans.core.startup.Main.start(Main.java:291) at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:114) at java.lang.Thread.run(Thread.java:619) ) This appears to occur after I access "Editor" from the Options and exit NetBeans (presumably causing option files to be written). I have to delete my .netbeans directory to be able to reboot NetBeans. I have not seen these problems on Windows (7-64, XP-32).
IMO this exception is unrelated to the original problem and I'm not sure what is causing the problem. I'm passing this to the module system owners, who might know more. Please pass it back the editor when fixed or if the fix has to be done in the editor somehow. Thanks
smokindoug's problem sounds completely unrelated and should not be filed here. Create a separate issue with a complete description of how to reproduce. Passing back to editor for original problem, whatever that was.
smokindoug, could you please file a separate report for 'Platform/Module System' and provide a step by step guidance on how to reproduce the problem. The exception seems to be a problem in loading resources (classloaders, modules, etc) and is not related to the original problem reported here (ie. no ui for customizing 'line height correction' setting). Thanks a lot.
Bug188217 opened...
Will this setting ever find its way into the options dialog? It's an important setting when using non-standard fonts and/or sizes.
Sorry, but we do not plan to add a visual setting for Line Height Correction. Please use {userdir}/config/Editors/Preferences/org-netbeans-modules-editor-settings-CustomPreferences.xml Sample of the file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE editor-preferences PUBLIC "-//NetBeans//DTD Editor Preferences 1.0//EN" "http://www.netbeans.org/dtds/EditorPreferences-1_0.dtd"> <editor-preferences> <entry javaType="java.lang.String" name="text-line-wrap" xml:space="preserve"> <value><![CDATA[words]]></value> </entry> <entry javaType="java.lang.Float" name="line-height-correction" xml:space="preserve"> <value><![CDATA[1.2]]></value> </entry> </editor-preferences> I have fixed issue 200942 yesterday so it should work fine now with the current view hierarchy.
The workaround given in this issue is no longer working in NetBeans IDE 7.0 onwards. May I open this issue or file a new one?