1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-08 00:35:49 +02:00

Send additional indexer notification after a project's pdom was initialized.

This commit is contained in:
Markus Schorn 2007-07-09 14:38:53 +00:00
parent e82ae65f18
commit 60e257f166
2 changed files with 45 additions and 0 deletions

View file

@ -65,6 +65,7 @@ import org.eclipse.cdt.internal.core.pdom.indexer.DeltaAnalyzer;
import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences; import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
import org.eclipse.cdt.internal.core.pdom.indexer.PDOMRebuildTask; import org.eclipse.cdt.internal.core.pdom.indexer.PDOMRebuildTask;
import org.eclipse.cdt.internal.core.pdom.indexer.PDOMUpdateTask; import org.eclipse.cdt.internal.core.pdom.indexer.PDOMUpdateTask;
import org.eclipse.cdt.internal.core.pdom.indexer.TriggerNotificationTask;
import org.eclipse.cdt.internal.core.pdom.indexer.nulli.PDOMNullIndexer; import org.eclipse.cdt.internal.core.pdom.indexer.nulli.PDOMNullIndexer;
import org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager; import org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager;
import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IFolder;
@ -504,6 +505,9 @@ public class PDOMManager implements IWritableIndexManager, IListener {
if (task != null) { if (task != null) {
enqueue(task); enqueue(task);
} }
else {
enqueue(new TriggerNotificationTask(this, pdom));
}
return; return;
} }
} }

View file

@ -0,0 +1,41 @@
/*******************************************************************************
* Copyright (c) 2007 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.pdom.indexer;
import org.eclipse.cdt.core.dom.IPDOMIndexer;
import org.eclipse.cdt.core.dom.IPDOMIndexerTask;
import org.eclipse.cdt.internal.core.pdom.IndexerProgress;
import org.eclipse.cdt.internal.core.pdom.PDOMManager;
import org.eclipse.cdt.internal.core.pdom.WritablePDOM;
import org.eclipse.core.runtime.IProgressMonitor;
public class TriggerNotificationTask implements IPDOMIndexerTask {
private WritablePDOM fPDOM;
private PDOMManager fManager;
public TriggerNotificationTask(PDOMManager manager, WritablePDOM pdom) {
fManager= manager;
fPDOM= pdom;
}
public IPDOMIndexer getIndexer() {
return null;
}
public IndexerProgress getProgressInformation() {
return new IndexerProgress();
}
public void run(IProgressMonitor monitor) {
fManager.handleChange(fPDOM);
}
}