Bug 23329

Summary: search: incorrect range for type references in brackets
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Bug Depends on:    
Bug Blocks: 22938    

Description Adam Kiezun CLA 2002-09-09 11:26:56 EDT
latest 2.1 patch
package p;
class NonnaPapera
{
}
class Paperino extends NonnaPapera
{
}
public class TestRefactor
{
	public static void main(String[] args)
	{
		Paperino paperino = new Paperino();
		NonnaPapera nonnaPapera = ( NonnaPapera )paperino;
	}
}


search for references to class NonnaPapera
the range of the ref found in main is incorrect
Comment 1 Jerome Lanneluc CLA 2002-09-13 06:21:48 EDT
Parser.consumeCastExpressionLL1() was incorrectly setting the positions of the 
type reference to the enclosing brackets (+1 and -1).

Fixed by not changing the positions of the type reference.
Comment 2 Jerome Lanneluc CLA 2002-09-13 06:42:21 EDT
Also fixed Parser.consumePrimaryNoNewArray() to not update the positions of the 
expression.
Comment 3 Jerome Lanneluc CLA 2002-09-13 06:50:52 EDT
Actually the last change (on Parser.consumePrimaryNoNewArray()) breaks the dom 
AST in the parenthesis expressin area. Backing out last change and reopening 
bug.
Comment 4 Jerome Lanneluc CLA 2002-09-13 09:08:02 EDT
Change pushed down to MatchLocatorParser.
Comment 5 David Audel CLA 2002-09-19 06:11:57 EDT
Verified.