Bug 91098 - The Mark Occurrences feature does not mark all occurrences
Summary: The Mark Occurrences feature does not mark all occurrences
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-12 06:07 EDT by Cyril Adrian CLA
Modified: 2005-05-17 04:49 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cyril Adrian CLA 2005-04-12 06:07:07 EDT
The precise test case is the following:

String a;
String[] b;
String[][] c;

Put the cursor on String or String[]. All occurrences of String get highlighted.
Now put the cursor on String[][]. No occurrence of String is highlighted. It
looks like there is a missing loop when removing square brackets ;o)

I use 3.1M6.

Best regards,

Cyril
Comment 1 Dani Megert CLA 2005-04-13 06:32:41 EDT
The important thing is to have this as variable declarations - it works for
field declarations:

public class Test {
	String fa; <- works
	String[] fb; <- works
	String[][] fc; <- works
	String[][][] fd; <- works
	
	void foo() {
		String a; <- works
		String[] b; <- works
		String[][] c; <- DOES NOT WORK
		String[][][] d; <- DOES NOT WORK
	}
}

Same behavior in 3.0. It seems that the bindings are not considered equal.

Moving to J Core for comment.
Comment 2 Olivier Thomann CLA 2005-04-13 10:33:18 EDT
I will investigate.
Comment 3 Olivier Thomann CLA 2005-04-13 11:33:29 EDT
The bug seems to come from wrong positions in the node for:
		String[][] c;
		String[][][] d;

The component types have no positions. I am investigating a fix.
Comment 4 Olivier Thomann CLA 2005-04-13 12:38:43 EDT
The problem did come from missing positions.
Fixed and released in HEAD.
Regression tests added in
org.eclipse.jdt.core.tests.dom.ASTConverterTestAST3_2.test0603/0604.
Comment 5 Maxime Daniel CLA 2005-05-13 06:52:43 EDT
Verified for 3.1 M7 using build I20050512-2035 + jdt.core HEAD.
Comment 6 Cyril Adrian CLA 2005-05-17 04:49:02 EDT
It works. Thank you very much :-)

Best regards,

Cyril