Bug 66165 - Task Location field does not follow source file linenumber.
Summary: Task Location field does not follow source file linenumber.
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2004-06-08 12:21 EDT by Luis de Diego CLA
Modified: 2007-06-22 10:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luis de Diego CLA 2004-06-08 12:21:38 EDT
After a new task is created on a source file line the task line number sometimes
gets not in synch with that source line, even after the file is saved. This is
shown when selecting the Task in the Tasks panel because the selection, instead
selecting the complete source file line, selects chunks of the previous and
target lines or target and next lines.

This synchronization problem happens when the target line whose has the task is
edited and new characters are inserted or the line is splitted in two while editing.
Comment 1 Dirk Baeumer CLA 2004-06-08 18:45:36 EDT
Seems to be annotation related. Moving to text.
Comment 2 Kai-Uwe Maetzel CLA 2004-06-09 04:40:21 EDT
Could you please provide an exact step by step description?
From what you said it sounds like the correct behavior.
Comment 3 Luis de Diego CLA 2004-06-09 10:44:16 EDT
The partial line selection is not reproducible every time, but multiline
selection does.

1. Edit a java source file.
2. Choose a line and create a task by using the right-mouse menu of the left
edit  column.
3. Edit the line which has the task and convert it into two or more lines of text.
4. Sometimes the task selection is not aligned with the text start but starts at
mid line and runs until next's line mid line. Or the selection now expands over
all the lines.
5. The task Location field still is related to the original line number and
every time you select the task more than a single line is selected or the
selection selects chunks of two consecutive lines.

Example:
1 private class Test() {
2 }

Create a task over line 1.
Edit line 1 and convert to:
1 private abstract class AbstractTest (){
2   private class Test() {

Edit line 2(now line 3) and convert it to:
3   }
4 }

Select task in Tasks list and the task selection expands the four lines.
Comment 4 Dani Megert CLA 2007-06-22 09:59:42 EDT
Get rid of deprecated state.
Comment 5 Dani Megert CLA 2007-06-22 10:04:52 EDT
.