Bug 31997 - Refactoring d.n. work for projects with brackets in name.
Summary: Refactoring d.n. work for projects with brackets in name.
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 34059 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-02-17 07:51 EST by Alexander Shatalin CLA
Modified: 2009-08-17 11:38 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.