mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 00:45:28 +02:00
set default scanner provider
This commit is contained in:
parent
a7ad0b285d
commit
caa5d189ab
3 changed files with 22 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2004-05-07 David Inglis
|
||||||
|
|
||||||
|
Setup a default scanner provider which uses the c path entries.
|
||||||
|
|
||||||
|
* src/org/eclipse/cdt/core/CCorePluging.java
|
||||||
|
* src/org/eclipse/cdt/core/resources/ScannerProvider.java
|
||||||
|
|
||||||
2004-05-07 Alain Magloire
|
2004-05-07 Alain Magloire
|
||||||
|
|
||||||
Bug in the PathEntyrManager, the container
|
Bug in the PathEntyrManager, the container
|
||||||
|
|
|
@ -25,6 +25,7 @@ import org.eclipse.cdt.core.model.IWorkingCopy;
|
||||||
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
|
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
|
||||||
import org.eclipse.cdt.core.resources.IConsole;
|
import org.eclipse.cdt.core.resources.IConsole;
|
||||||
import org.eclipse.cdt.core.resources.IPathEntryStore;
|
import org.eclipse.cdt.core.resources.IPathEntryStore;
|
||||||
|
import org.eclipse.cdt.core.resources.ScannerProvider;
|
||||||
import org.eclipse.cdt.core.search.SearchEngine;
|
import org.eclipse.cdt.core.search.SearchEngine;
|
||||||
import org.eclipse.cdt.internal.core.CDTLogWriter;
|
import org.eclipse.cdt.internal.core.CDTLogWriter;
|
||||||
import org.eclipse.cdt.internal.core.CDescriptorManager;
|
import org.eclipse.cdt.internal.core.CDescriptorManager;
|
||||||
|
@ -916,6 +917,9 @@ public class CCorePlugin extends Plugin {
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
// log(e);
|
// log(e);
|
||||||
}
|
}
|
||||||
|
if ( provider == null) {
|
||||||
|
return ScannerProvider.getInstance();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return provider;
|
return provider;
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,18 @@ public class ScannerProvider extends AbstractCExtension implements IScannerInfoP
|
||||||
// Listeners interested in build model changes
|
// Listeners interested in build model changes
|
||||||
private static Map listeners;
|
private static Map listeners;
|
||||||
|
|
||||||
|
private static ScannerProvider fProvider;
|
||||||
|
|
||||||
// Map of the cache scannerInfos
|
// Map of the cache scannerInfos
|
||||||
|
|
||||||
|
public static synchronized IScannerInfoProvider getInstance() {
|
||||||
|
if ( fProvider == null) {
|
||||||
|
fProvider = new ScannerProvider();
|
||||||
|
CoreModel.getDefault().addElementChangedListener(fProvider);
|
||||||
|
}
|
||||||
|
return fProvider;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -119,7 +129,7 @@ public class ScannerProvider extends AbstractCExtension implements IScannerInfoP
|
||||||
if (refCProject != null) {
|
if (refCProject != null) {
|
||||||
IPathEntry[] projEntries = refCProject.getResolvedPathEntries();
|
IPathEntry[] projEntries = refCProject.getResolvedPathEntries();
|
||||||
for (int j = 0; j < projEntries.length; j++) {
|
for (int j = 0; j < projEntries.length; j++) {
|
||||||
if (entries[i].getEntryKind() == IPathEntry.CDT_INCLUDE) {
|
if (entries[i].isExported()) {
|
||||||
addInfoFromEntry(projEntries[j], resPath, includeList, symbolMap);
|
addInfoFromEntry(projEntries[j], resPath, includeList, symbolMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue