Bug 116650 - [search] SearchParticipant has no way to remove specific index file from IndexManager cache
Summary: [search] SearchParticipant has no way to remove specific index file from Inde...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-16 07:44 EST by Frederic Fusier CLA
Modified: 2005-12-13 10:55 EST (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 Frederic Fusier CLA 2005-11-16 07:44:45 EST
Build 3.2 M3 (but already exists in 3.0)

Working on failing tests in SearchParticipantTests, there's a test which uses a
SearchParticipant with a specific index location. Then, corresponding Index is
stored in IndexManager cache.

Problem is at the end of test, project is deleted and we want also to remove the
specific index file using IO File delete() method. Unfortunately, doing this,
Index is not removed from IndexManager cache and there's no way to do it...

Next test creates same SearchParticipant which fails to save the Index as it
considers that it already exists in the IndexManager cache and so does not
create the underlying IO file...
Comment 1 Jerome Lanneluc CLA 2005-11-16 07:55:10 EST
It looks like a design hole in search participants. We might want to provide an
API that deletes the index given an index location (e.g.
SearchParticipant#removeIndex(IPath indexLocation)) and encourage clients to use
it instead of manually deleting the index file themselves. This would give us
the oportunity to remove it from the cache.
Comment 2 Frederic Fusier CLA 2005-12-01 11:08:44 EST
Fixed and released in HEAD.

Test cases modified in SearchParticipantTests
Comment 3 Jerome Lanneluc CLA 2005-12-13 10:55:20 EST
Verified for 3.2 M4 using build I20051213-0010