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 57058 - When jumping to a location in a different file, editor is not scrolled properly
Summary: When jumping to a location in a different file, editor is not scrolled properly
Status: RESOLVED DUPLICATE of bug 53727
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-28 09:30 UTC by peterz
Modified: 2007-11-05 13:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
message.log (8.84 KB, text/plain)
2005-03-29 08:18 UTC, peterz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peterz 2005-03-28 09:30:01 UTC
Sometimes NetBeans is requested to open a file and jump to some location inside
it. For example, this can happen when i Ctrl+click on a method call, or press F7
while debugging.

NetBeans opens the file and places the caret correctly, BUT the editor often
scrolled so that the caret is outside the visible area. I have to press an arrow
key to get it scrolled to the caret. Sometimes this works properly, but
sometimes not -- in my case roughly 1 time out of 3 i see this bug.

Steps (NB 4.1 / Linux):
- Open a system class, e.g. javax.swing.AbstractButton
- Ctrl+Click on a method in a different class, (try clicking on repaint())
- JComponent.java opens and the caret is far outside the visible area.

I think proper behavior is to make sure caret is in the center of visible area.
This way user will be able to locate the caret quickly, even if caret row is not
highlighted.
Comment 1 Dusan Balek 2005-03-29 07:36:28 UTC
Could you attach your IDE log file ($userdir/var/log/messages.log) to this
issue? Thanks.
Comment 2 peterz 2005-03-29 08:18:27 UTC
Created attachment 21170 [details]
message.log
Comment 3 peterz 2005-03-29 08:24:40 UTC
Attached my message.log (doesn't seem very helpful =(. Here's what i did:
- Started NB (4.1beta on Linux), it opened my project
- Opened AbstractButton.java, scrolled it down to method public void setText()
- Ctrl+clicked on repaint() -- JComponent.java opened and was scrolled properly
- Same with revalidate()
- Ctrl+clicked on firePropertyChange() - Component.java was opened and scrolled
to the end, though caret was far away from there -- bug
Comment 4 Miloslav Metelka 2005-03-29 08:50:57 UTC
Do you have any code folding presets for java (e.g. initial folding of java
method bodies etc.)?
Comment 5 Dusan Balek 2005-03-29 09:25:46 UTC
Already fixed. You could try to use some post Feb 24 build.

*** This issue has been marked as a duplicate of 53727 ***