Bug 70414 - [projection] Line numbers not updated correctly
Summary: [projection] Line numbers not updated correctly
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-20 08:49 EDT by Ernest Pasour CLA
Modified: 2023-12-17 19:33 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ernest Pasour CLA 2004-07-20 08:49:13 EDT
Using 3.0 final.

I created a new editor and setup a projection viewer to use to provide folding
information.  In my folding structure provider, I create folding regions that
extend from the beginning of my desired folded code to the end of my desired
folding area.  The end point is never column 1.  The result is that when I click
on a triangle to fold some code, all the subsequent lines in the file (beyond
the current folded region) are off by one.  That is, the line numbers appear to
be off by one.  Multiple folded regions can lead to line numbers being off by
more than one.  The problem appears to be that the projection viewer doesn't
account for carriage returns while associating text and line numbers.

I don't know what the correct behavior should be.  It may be that the region
that I set should be expanded until it covers the next line boundary in either
direction.  Or there may be some sense to allowing multiple folding regions per
line.

The workaround is just for me to coerce my positions to be on line boundaries.
Comment 1 Dani Megert CLA 2004-07-23 07:19:07 EDT
The projection model allows any region but the ProjectionViewer is line based. I
would expect that the viewer takes care of adapting the model.
Comment 2 Dani Megert CLA 2004-07-29 11:55:33 EDT
The same can be seen with "correct" regions.
Comment 3 Eclipse Genie CLA 2020-01-04 07:58:12 EST
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.

If you have further information on the current state of the bug, please add it. 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.
Comment 4 Eclipse Genie CLA 2021-12-26 13:48:01 EST
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.

If you have further information on the current state of the bug, please add it. 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.
Comment 5 Eclipse Genie CLA 2023-12-17 19:33:31 EST
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.

If you have further information on the current state of the bug, please add it. 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.