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 182810 - [69cat] Change gutter marks on wrong line
Summary: [69cat] Change gutter marks on wrong line
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords: REGRESSION
: 182872 182903 183017 183057 183090 183093 183441 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-25 16:44 UTC by Jesse Glick
Modified: 2010-04-09 04:39 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
spaces between lines (10.41 KB, image/png)
2010-03-26 09:07 UTC, Ondrej Vrabec
Details
Sample image (9.29 KB, image/png)
2010-04-01 17:33 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-03-25 16:44:57 UTC
Perhaps as a consequence of the new editor view hierarchy, Mercurial change markers appear on the wrong line. For example, with starting code

/**
 * XXX
 */
public class C {

and new code

/**
 * XXX
 * foo
 */
public class C {

the green bar appears next to " */" rather than " * foo" as expected.

(May be a side effect of bug #182504.)
Comment 1 Ondrej Vrabec 2010-03-26 09:03:25 UTC
Reassigning to editor for evaluation. Does editorUI return the correct value of lineHeight? When i decrease the returned value of lineHeight by a certain constant, markers seem to be correctly placed. However the constant differs in dependence on value of --fontsize. Should we deal with the changes in diff or can this be fixed in editor?

The relevant code computing diff marker positions is in http://hg.netbeans.org/cdev/file/2ba51d984c07/versioning/src/org/netbeans/modules/versioning/diff/DiffSidebar.java#l651
Comment 2 Ondrej Vrabec 2010-03-26 09:07:24 UTC
I've also noticed that there are small spaces between lines in editor, maybe it's related to this issue.
Comment 3 Ondrej Vrabec 2010-03-26 09:07:30 UTC
Created attachment 95892 [details]
spaces between lines
Comment 4 Jan Lahoda 2010-03-29 07:38:04 UTC
*** Bug 182903 has been marked as a duplicate of this bug. ***
Comment 5 Ondrej Vrabec 2010-03-29 11:35:35 UTC
*** Bug 183057 has been marked as a duplicate of this bug. ***
Comment 6 stefan79 2010-03-29 11:37:29 UTC
Local-History Line is also wrong.
Comment 7 Jan Lahoda 2010-03-29 14:52:39 UTC
*** Bug 183093 has been marked as a duplicate of this bug. ***
Comment 8 Ondrej Vrabec 2010-03-29 15:00:54 UTC
*** Bug 183090 has been marked as a duplicate of this bug. ***
Comment 9 Vitezslav Stejskal 2010-04-01 10:02:49 UTC
This works now better after http://hg.netbeans.org/jet-main/rev/53af119ca970. If linewrap setting is off the diff sidebar works fine. The problem is when linewrap is on and there are lines in the document that are wrapped. In that case the diff marks are completely misaligned. The reason for that is that with linewrap on lines have no longer the same height. This needs to be changed in the diff sidebar. Specifically, any code using EditorUI.getLineHeight() or EditorUI.getAscent() needs to be reviewed and fixed.
Comment 10 Michel Graciano 2010-04-01 17:32:30 UTC
Well I can see it still for mercurial but can't reproduce it anymore for CVS. It is no more so easy to reproduce it for mercurial but I saw it happens again today. Build 100331-eb8d22d7ddd4. BTW, for another kind of annotations as hint, debugger breakpoint and so on it is still valid as in attached image, but this is the case for another issue IMO.
Comment 11 Michel Graciano 2010-04-01 17:33:03 UTC
Created attachment 96550 [details]
Sample image
Comment 12 Ondrej Vrabec 2010-04-07 10:14:32 UTC
fix in vcs annotation bar: http://hg.netbeans.org/cdev/rev/85bd70d858c7
Comment 13 Ondrej Vrabec 2010-04-07 10:14:38 UTC
fix in diff sidebar: http://hg.netbeans.org/cdev/rev/99cd74f0dcfb
Comment 14 Ondrej Vrabec 2010-04-07 10:14:45 UTC
fix in diff panel: http://hg.netbeans.org/cdev/rev/92fc8b30f2e5
Comment 15 Ondrej Vrabec 2010-04-07 10:14:54 UTC
final fix for diff sidebar: http://hg.netbeans.org/cdev/rev/22420a9b0be5
Comment 16 Ondrej Vrabec 2010-04-07 10:15:00 UTC
final fix for diff panel: http://hg.netbeans.org/cdev/rev/c988963419bd
Comment 17 Ondrej Vrabec 2010-04-07 11:52:00 UTC
*** Bug 183017 has been marked as a duplicate of this bug. ***
Comment 18 Vitezslav Stejskal 2010-04-07 12:28:20 UTC
*** Bug 183441 has been marked as a duplicate of this bug. ***
Comment 19 Vitezslav Stejskal 2010-04-07 12:29:29 UTC
*** Bug 182872 has been marked as a duplicate of this bug. ***
Comment 20 Quality Engineering 2010-04-09 04:39:18 UTC
Integrated into 'main-golden', will be available in build *201004090201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/85bd70d858c7
User: Ondrej Vrabec <ovrabec@netbeans.org>
Log: Issue #182810 - [69cat] Change gutter marks on wrong line