Bug 77644 - [dom] AST node extended positions may be wrong while moving
Summary: [dom] AST node extended positions may be wrong while moving
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-03 10:21 EST by Frederic Fusier CLA
Modified: 2004-12-14 11:45 EST (History)
2 users (show)

See Also:


Attachments
Starting point to fix this issue (3.57 KB, patch)
2004-11-03 10:23 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2004-11-03 10:21:05 EST
Using 3.1 M3.

Open this bug to complete fix done for bug 77538. When node parent's change
while moving and new parent's node is still original, then extended positions
for node will be wrong as it is computed using parent's extended ones...

I attach the patch to this bug which is a starting point for this bug fix but
need more investigation to:
 1) verify that it's not too much time consuming
 2) pass specific DefaultCommentMapper tests
Comment 1 Frederic Fusier CLA 2004-11-03 10:23:43 EST
Created attachment 15610 [details]
Starting point to fix this issue
Comment 2 Frederic Fusier CLA 2004-11-09 17:10:47 EST
Fixed.

Instead of storing { -1, -1 } for range of node needing parent extended
position, compute directly extended position for children when an extended is
found for a node.
This new algorithm has the advantage to remove all unnecessary entries when
parent has in fact no extended position...
Also change HashMap for arrays to stores leading and trailing ranges and nodes
to minimize storage and time execution.

[jdt-core-internal]
Changes done in DefaultCommentMapper.
Test case added in ASTConverterJavadocTest
Comment 3 Olivier Thomann CLA 2004-12-14 11:45:03 EST
Verified in 200412140800