mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Modified IndexManger to get rid of an exisiting index for a project when an
indexer gets changed.
This commit is contained in:
parent
0861c2c64f
commit
3097c2f126
2 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-03-30 Bogdan Gheorghe
|
||||
Modified IndexManger to get rid of an exisiting index for a project when an
|
||||
indexer gets changed. This is needed in the case where two indexers share the same
|
||||
storage (which is the current case for all indexers) to avoid them treading
|
||||
on each other.
|
||||
|
||||
2005-03-29 Bogdan Gheorghe
|
||||
Changed indexer change notification to run as a job.
|
||||
Some additiional ICDTIndexer changes.
|
||||
|
|
|
@ -334,10 +334,18 @@ public class IndexManager extends JobManager{
|
|||
* @param project
|
||||
*/
|
||||
public void indexerChangeNotification(IProject project) {
|
||||
|
||||
//Get rid of any jobs scheduled by the old indexer
|
||||
this.discardJobs(project.getName());
|
||||
|
||||
//Get rid of the old index file
|
||||
ICDTIndexer currentIndexer = getIndexerForProject(project);
|
||||
IIndexStorage storage = currentIndexer.getIndexStorage();
|
||||
if (storage instanceof CIndexStorage)
|
||||
((CIndexStorage) storage).removeIndex(project.getFullPath());
|
||||
|
||||
monitor.enterWrite();
|
||||
try{
|
||||
//Get rid of any jobs scheduled by the old indexer
|
||||
this.discardJobs(project.getName());
|
||||
try{
|
||||
//Purge the old indexer from the indexer map
|
||||
Object e = indexerMap.remove(project);
|
||||
} finally {
|
||||
|
|
Loading…
Add table
Reference in a new issue