Bug 31997

Summary: Refactoring d.n. work for projects with brackets in name.
Product: [Eclipse Project] JDT Reporter: Alexander Shatalin <vano>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akiezun, Eric.Vlemmix, nick.entin, shatalin
Version: 2.0.2   
Target Milestone: 2.1 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Alexander Shatalin CLA 2003-02-17 07:51:10 EST
- Create new project, which name contains "(" or ")" bracket.
- Create two classes (p1.C1, p1.C2) in it.
- In class p1.C1 create attribute: "private C2 myC2 = new C2();"
- Invoke Refactor/Rename menu item for C2 -> Class would be renamed, but 
corresponding reference in C1 class would not.
Comment 1 Adam Kiezun CLA 2003-02-17 07:58:15 EST
will have a look
Comment 2 Adam Kiezun CLA 2003-02-17 11:01:20 EST
looks like a SearchEngine problem
we correctly call SearchEngine with

searchPattern: TypeReferencePattern: pkg<p1>, type<C2>, exact match, case 
sensitive

scope: JavaSearchScope on [
	/A(
]

(no working copies)

and get no hits
search view must be doing something diffent, because it does get hits
Comment 3 Jerome Lanneluc CLA 2003-02-18 04:08:30 EST
Was able to reproduce using the Search UI: the problem happens if there is no 
editor open (i.e. no working copy passed to the SearchEngine).

It looks like the index for the project with bracket is not found.
Comment 4 Jerome Lanneluc CLA 2003-02-18 04:30:50 EST
Actually the index is found. Querying this index fails to find the references.
Problem is with IndexedFile.INFO_BEGIN constant whose value is "(". Thus 
IndexedFile.getPath() will always return the project name (up until the 
bracket) instead of the cu path.
Comment 5 Philipe Mulet CLA 2003-02-18 05:46:17 EST
Property support in IndexedFile is never used, got rid of it since we don't 
need it anyway.
Comment 6 Jerome Lanneluc CLA 2003-02-18 06:20:48 EST
Added regression test JavaSearchTests.testTypeReference4()
Comment 7 Philipe Mulet CLA 2003-03-07 11:57:34 EST
*** Bug 34059 has been marked as a duplicate of this bug. ***
Comment 8 David Audel CLA 2003-03-11 07:52:32 EST
Verified.