Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 384156 - [projection] Wrong scroll position when restoring editor
Summary: [projection] Wrong scroll position when restoring editor
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-03 09:30 EDT by Arne Schröder CLA
Modified: 2020-07-01 20:18 EDT (History)
3 users (show)

See Also:


Attachments
The source file used to demostrate the bug. (6.30 KB, application/octet-stream)
2012-07-03 10:26 EDT, Arne Schröder CLA
no flags Details
First Screenshot (75.57 KB, image/png)
2012-07-03 10:28 EDT, Arne Schröder CLA
no flags Details
Second Screenshot (70.29 KB, image/png)
2012-07-03 10:29 EDT, Arne Schröder CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Schröder CLA 2012-07-03 09:30:15 EDT
Build Identifier: 20120614-1722

If some portion of the code is collapsed at the beginning of a document and the viewer is scrolled past it, Eclipse will not restore the right position of the viewer after eclipse is closed and reopened again.

Reproducible: Always

Steps to Reproduce:
1. Open some editor with foldable content.
2. Create some folding at the beginning of the file. (E.g. lines 2-10)
3. Collapse this folding.
4. Scroll down so the folding is not visible any more. (E.g. line 12 is the top line)
5. Close Eclipse.
6. Reopen Eclipse.

What happens:
The editor has some smaller top line (e.g. top line is line 5) than before.

What one would expect to happen:
Eclipse usually restores the editor just the way I left it. (Which is great, by the way.) So I woul expect the editor to have line 12 as the top line, regardless of whether the folding from line 2 to 10 is collapsed or not.
Comment 1 Dani Megert CLA 2012-07-03 09:47:24 EDT

*** This bug has been marked as a duplicate of bug 375576 ***
Comment 2 Arne Schröder CLA 2012-07-03 10:26:57 EDT
Created attachment 218223 [details]
The source file used to demostrate the bug.
Comment 3 Arne Schröder CLA 2012-07-03 10:28:37 EDT
Created attachment 218224 [details]
First Screenshot

I do not believe this bug to be a duplicate of the cited bug.

I hope the attached screenshots together with my comments explain my point:

1. I open the attached file "ProjectionBug.java".
2. I collapse the first comment regardin the class, which says "Long Comment..."
3. I scroll down one step, so the top line in my editor is line 61. (See first screenshot)
4. I close Eclipse and open it again.
5. Result: The collapsed folding of the first comment is expanded (this is okay) and the editor's first line is 4 (this is not okay). (See second screenshot)

Also this bug is reproducable in Eclipse 3.7 and bug 375576 was introduced in 4.2.
Comment 4 Arne Schröder CLA 2012-07-03 10:29:03 EDT
Created attachment 218225 [details]
Second Screenshot
Comment 5 Arne Schröder CLA 2012-07-03 10:30:22 EDT
Sorry for the misuse of Bugzilla, but apparently I am too stupid to attach three files to a comment.

The comment was:

I do not believe this bug to be a duplicate of the cited bug.

I hope the attached screenshots together with my comments explain my point:

1. I open the attached file "ProjectionBug.java".
2. I collapse the first comment regardin the class, which says "Long
Comment..."
3. I scroll down one step, so the top line in my editor is line 61. (See first
screenshot)
4. I close Eclipse and open it again.
5. Result: The collapsed folding of the first comment is expanded (this is
okay) and the editor's first line is 4 (this is not okay). (See second
screenshot)

Also this bug is reproducable in Eclipse 3.7 whereas bug 375576 was introduced in
4.2.
Comment 6 Dani Megert CLA 2012-07-03 10:44:30 EDT
> I do not believe this bug to be a duplicate of the cited bug.
Indeed.

The bug happens when the folding in the file doesn't match the default folding when an editor is opened.
Comment 7 Eclipse Genie CLA 2020-07-01 20:18:48 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.