1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-08-31 17:47:57 -07:00
parent f351138c31
commit 0dfb1ee847
2 changed files with 94 additions and 96 deletions

View file

@ -119,7 +119,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
boolean requestUpdate(IIndexFragmentFile ifile, Object tu, UpdateKind kind) { boolean requestUpdate(IIndexFragmentFile ifile, Object tu, UpdateKind kind) {
if (tu != null) if (tu != null)
fTu= tu; fTu= tu;
if (kind != null) if (fKind == null)
fKind= kind; fKind= kind;
if (ifile == null) { if (ifile == null) {
@ -638,7 +638,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
for (IIndexFragmentFile ifile : indexFiles) { for (IIndexFragmentFile ifile : indexFiles) {
if (ifile != null) { if (ifile != null) {
IIndexInclude ctx= ifile.getParsedInContext(); IIndexInclude ctx= ifile.getParsedInContext();
if (ctx == null && !indexedUnconditionally) { if (ctx == null && !indexedUnconditionally && ifile.hasContent()) {
iFilesToRemove.add(ifile); iFilesToRemove.add(ifile);
count++; count++;
} else { } else {
@ -899,7 +899,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
final IIndexFragmentFile headerFile = versionTask.fIndexFile; final IIndexFragmentFile headerFile = versionTask.fIndexFile;
final int safeguardSize= safeGuard.size(); final int safeguardSize= safeGuard.size();
for(;;) { while (true) {
// Look for a context and parse the file // Look for a context and parse the file
IIndexFragmentFile ctxFile = findContextFile(linkageID, map, versionTask, safeGuard, monitor); IIndexFragmentFile ctxFile = findContextFile(linkageID, map, versionTask, safeGuard, monitor);
if (ctxFile == null || ctxFile == headerFile) if (ctxFile == null || ctxFile == headerFile)
@ -951,7 +951,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
final FileVersionTask versionTask, LinkedHashSet<IIndexFile> safeGuard, IProgressMonitor monitor) final FileVersionTask versionTask, LinkedHashSet<IIndexFile> safeGuard, IProgressMonitor monitor)
throws CoreException, InterruptedException { throws CoreException, InterruptedException {
IIndexFragmentFile ctxFile= versionTask.fIndexFile; IIndexFragmentFile ctxFile= versionTask.fIndexFile;
for(;;) { while (true) {
IIndexInclude ctxInclude= ctxFile.getParsedInContext(); IIndexInclude ctxInclude= ctxFile.getParsedInContext();
if (ctxInclude == null) if (ctxInclude == null)
return ctxFile; return ctxFile;
@ -960,7 +960,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
if (nextCtx == null) if (nextCtx == null)
return nextCtx; return nextCtx;
// Found a recursion // Found a recursion.
if (!safeGuard.add(nextCtx)) if (!safeGuard.add(nextCtx))
return null; return null;
@ -984,7 +984,6 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
} }
} }
private DependsOnOutdatedFileException parseFile(Object tu, AbstractLanguage lang, private DependsOnOutdatedFileException parseFile(Object tu, AbstractLanguage lang,
IIndexFileLocation ifl, IScannerInfo scanInfo, FileContext ctx, IProgressMonitor pm) IIndexFileLocation ifl, IScannerInfo scanInfo, FileContext ctx, IProgressMonitor pm)
throws CoreException, InterruptedException { throws CoreException, InterruptedException {

View file

@ -221,17 +221,16 @@ abstract public class PDOMWriter {
data.fSymbolMap.put(file.includeStatement, new Symbols()); data.fSymbolMap.put(file.includeStatement, new Symbols());
} }
// Extract symbols from AST.
// Extract symbols from AST
extractSymbols(data); extractSymbols(data);
// Name resolution // Name resolution.
resolveNames(data, pm); resolveNames(data, pm);
// Index update // Index update.
storeSymbolsInIndex(data, ctx, flushIndex, pm); storeSymbolsInIndex(data, ctx, flushIndex, pm);
// Tasks update // Tasks update.
if (taskUpdater != null) { if (taskUpdater != null) {
Set<IIndexFileLocation> locations= new HashSet<IIndexFileLocation>(); Set<IIndexFileLocation> locations= new HashSet<IIndexFileLocation>();
for (FileInAST file : selectedFiles) { for (FileInAST file : selectedFiles) {