Bug 116650

Summary: [search] SearchParticipant has no way to remove specific index file from IndexManager cache
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jerome_lanneluc
Version: 3.2   
Target Milestone: 3.2 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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