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.

Bug 16087 - Wrong line spacing and size of carret in editor.
Summary: Wrong line spacing and size of carret in editor.
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: Sun SunOS
: P3 blocker (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 16649 60962 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-01 17:36 UTC by Jan Zajicek
Modified: 2016-07-07 07:25 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Zajicek 2001-10-01 17:36:51 UTC
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.
Comment 1 Martin Roskanin 2001-10-17 16:38:50 UTC
*** Issue 16649 has been marked as a duplicate of this issue. ***
Comment 2 Martin Roskanin 2001-10-18 11:05:36 UTC
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.
Comment 3 Miloslav Metelka 2001-10-18 15:45:15 UTC
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.
Comment 4 Miloslav Metelka 2001-10-19 11:03:07 UTC
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.
Comment 5 Petr Jiricka 2001-11-01 09:25:54 UTC
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);

Comment 6 Petr Jiricka 2001-11-01 13:49:10 UTC
The fix in module web would be suboptimal, so assigning back to 
editor.
Comment 7 Martin Roskanin 2001-11-01 15:42:41 UTC
Item 3 was fixed in [maintrunk]
Items 1 and 2 should be done in web module, if I understand Mila's comment correctly.
Mato
Comment 8 Petr Jiricka 2001-11-13 14:35:51 UTC
It was agreed that the problem would be addresed by the Editor team, 
assigning to editor.
Comment 9 Miloslav Metelka 2001-11-15 11:04:12 UTC
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.
Comment 10 Miloslav Metelka 2002-06-14 16:12:54 UTC
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.
Comment 11 Roman Strobl 2005-01-21 11:58:19 UTC
Obsolete target milestone, changed to TBD. Please re-evaluate.
Comment 12 Martin Roskanin 2006-01-10 12:50:41 UTC
*** Issue 60962 has been marked as a duplicate of this issue. ***
Comment 13 Martin Balin 2016-07-07 07:25:55 UTC
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