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.
Start ide. Open options and change font size in the java editor to 30. Create new JSP. The JSP editor will show text as 12 but line spacing and size of carret are 30. Not sure if problem in nbeditor in in web module, feel free to reassign. Marking this as P2 - bad inpact on users - feel free to lower this.
*** Issue 16649 has been marked as a duplicate of this issue. ***
Note that this behaviour occurs not only in font size changing. It is coloring issue. (Font is binded to coloring) That's why you can set color for Java Method Call in Java Editor and the changes are reflected in JSP Editor too. It seems that the problem affects only java-xxx properties. If you change the font size for default coloring (Java editor) the change is not reflected in JSP editor. This behaviour has been detected in NB 3.2.1 build 98 too.
There are actually 3 problems: 1. We need to improve our Coloring customizer to allow not to inherit just the whole font but font-name, font-size and font-style. The coloring has this capability but the customizer not so once the customizer gets called the font-mode is always garbled to apply the whole font. 2. There's a problem that once the font == null in Coloring the "default" coloring is used. However the JSP default is always used for jsp colorings (which is OK) and also for java and html colorings in JSP (which is questionable - IMHO it would probably be more logical to use java and html defaults for these). The combination of 1. and 2. causes the problem. The editor is actually correct in its computations because the line can really be big once you write java keyword or java comment - they are big because they used bold/italic fonts -> therefore they cannot use null to inherit the font and the problem 1) causes their font to be fully used (instead of just using the bold/italic style). 3. Just one minor - the JSP kit should first do BaseKit.getKit(JavaKit.class) BaseKit.getKit(HTMLKit.class) so that the corresponding options are initialized. This is necessary because JSP options (colorings) delegate to java/html colorings.
According to my last comment I think that currently the only solution will be that JSP module will retrieve and create copies of the java and html colorings once it is first installed. The further modifications of these colorings will be done normally through the customization of the jsp fonts&colors. Reassigning to web module.
Regarding initialization of kits - calling BaseKit.getKit(JavaKit.class) BaseKit.getKit(HTMLKit.class) Isn't this done in JSPKit, line 158, by calling the following ? EditorKit kit = JEditorPane.createEditorKitForContentType(language);
The fix in module web would be suboptimal, so assigning back to editor.
Item 3 was fixed in [maintrunk] Items 1 and 2 should be done in web module, if I understand Mila's comment correctly. Mato
It was agreed that the problem would be addresed by the Editor team, assigning to editor.
I think the best will be to implement 1) in the editor. However we cannot do it sooner than in 3.4. So I'm changing the target milestone to 3.4. I also think that this is P3 so I'm changing priority. Please raise back if necessary.
I'm changing this to enhancement as we need to revise and possibly change the whole strategy of the colorings inheritance in 4.0. In this case all the java colorings must use the default of the jsp (including method's and comments coloring) as the java is embedded into jsp here.
Obsolete target milestone, changed to TBD. Please re-evaluate.
*** Issue 60962 has been marked as a duplicate of this issue. ***
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss