diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java index 72626c5ef86..f3e90ee0dec 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java @@ -251,7 +251,7 @@ public class IndexBugsTests extends BaseTestCase { // #define macro164500 1 // #undef macro164500 // #define macro164500 2 - public void _test164500() throws Exception { + public void test164500() throws Exception { waitForIndexer(); String content= readTaggedComment("test164500"); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IWritableIndex.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IWritableIndex.java index c233f8ea785..e6f1c54b6e3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IWritableIndex.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IWritableIndex.java @@ -31,19 +31,11 @@ public interface IWritableIndex extends IIndex { IIndexFragmentFile addFile(IPath fileLocation) throws CoreException; /** - * Adds an AST name to the given file. + * Adds content to the given file. */ - void addName(IIndexFragmentFile sourceFile, IASTName name) throws CoreException; - - /** - * Adds a AST macro to the given file. - */ - void addMacro(IIndexFragmentFile sourceFile, IASTPreprocessorMacroDefinition macro) throws CoreException; - - /** - * Adds an include to the given file. - */ - void addInclude(IIndexFragmentFile sourceFile, IIndexFragmentFile destFile, IASTPreprocessorIncludeStatement directive) throws CoreException; + void setFileContent(IIndexFragmentFile sourceFile, + IASTPreprocessorIncludeStatement[] includes, + IASTPreprocessorMacroDefinition[] macros, IASTName[] names) throws CoreException; /** * Clears the entire index. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IWritableIndexFragment.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IWritableIndexFragment.java index eabcdb07fec..f17787f1d1b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IWritableIndexFragment.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IWritableIndexFragment.java @@ -39,17 +39,9 @@ public interface IWritableIndexFragment extends IIndexFragment { /** * Adds an include to the given file. */ - void addInclude(IIndexFragmentFile sourceFile, IIndexFragmentFile destFile, IASTPreprocessorIncludeStatement include) throws CoreException; - - /** - * Adds a AST macro to the given file. - */ - void addMacro(IIndexFragmentFile sourceFile, IASTPreprocessorMacroDefinition macro) throws CoreException; - - /** - * Adds an AST name to the given file. - */ - void addName(IIndexFragmentFile sourceFile, IASTName name) throws CoreException; + void addFileContent(IIndexFragmentFile sourceFile, + IASTPreprocessorIncludeStatement[] includes, IIndexFragmentFile[] destFiles, + IASTPreprocessorMacroDefinition[] macros, IASTName[] names) throws CoreException; /** * Acquires a write lock, while giving up a certain amount of read locks. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/WritableCIndex.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/WritableCIndex.java index 127c1307a9b..27a290d472c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/WritableCIndex.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/WritableCIndex.java @@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; public class WritableCIndex extends CIndex implements IWritableIndex { @@ -45,15 +46,6 @@ public class WritableCIndex extends CIndex implements IWritableIndex { return fWritableFragments[0]; } - public void addInclude(IIndexFragmentFile sourceFile, IIndexFragmentFile destFile, - IASTPreprocessorIncludeStatement include) throws CoreException { - IIndexFragment indexFragment = sourceFile.getIndexFragment(); - assert isWritableFragment(indexFragment); - assert isWritableFragment(destFile.getIndexFragment()); - - ((IWritableIndexFragment) indexFragment).addInclude(sourceFile, destFile, include); - } - private boolean isWritableFragment(IIndexFragment frag) { for (int i = 0; i < fWritableFragments.length; i++) { if (fWritableFragments[i] == frag) { @@ -62,19 +54,21 @@ public class WritableCIndex extends CIndex implements IWritableIndex { } return false; } - - public void addMacro(IIndexFragmentFile sourceFile, IASTPreprocessorMacroDefinition macro) throws CoreException { - IIndexFragment indexFragment = sourceFile.getIndexFragment(); - assert isWritableFragment(indexFragment); - - ((IWritableIndexFragment) indexFragment).addMacro(sourceFile, macro); - } - public void addName(IIndexFragmentFile sourceFile, IASTName name) throws CoreException { - IIndexFragment indexFragment = sourceFile.getIndexFragment(); + public void setFileContent(IIndexFragmentFile file, + IASTPreprocessorIncludeStatement[] includes, + IASTPreprocessorMacroDefinition[] macros, IASTName[] names) throws CoreException { + + IIndexFragment indexFragment = file.getIndexFragment(); assert isWritableFragment(indexFragment); - ((IWritableIndexFragment) indexFragment).addName(sourceFile, name); + IIndexFragmentFile[] destFiles= new IIndexFragmentFile[includes.length]; + for (int i = 0; i < includes.length; i++) { + IASTPreprocessorIncludeStatement statement = includes[i]; + destFiles[i]= addFile(new Path(statement.getPath())); + } + ((IWritableIndexFragment) indexFragment).addFileContent(file, + includes, destFiles, macros, names); } public void clear() throws CoreException { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMIndexerJob.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMIndexerJob.java index af52b139f9c..d726575f6e6 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMIndexerJob.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMIndexerJob.java @@ -114,16 +114,21 @@ public class PDOMIndexerJob extends Job { protected IStatus run(IProgressMonitor m) { String taskName = CCorePlugin.getResourceString("pdom.indexer.task"); //$NON-NLS-1$ monitor.beginTask(taskName, 1000); - int currentTick= 0; - while(!m.isCanceled()) { - currentTick= pdomManager.getMonitorMessage(monitor, currentTick, 1000); - try { - Thread.sleep(350); - } catch (InterruptedException e) { - return Status.CANCEL_STATUS; + try { + int currentTick= 0; + while(!m.isCanceled()) { + currentTick= pdomManager.getMonitorMessage(monitor, currentTick, 1000); + try { + Thread.sleep(350); + } catch (InterruptedException e) { + return Status.CANCEL_STATUS; + } } + return Status.OK_STATUS; + } + finally { + monitor.done(); } - return Status.OK_STATUS; } }; fMonitorJob.setSystem(true); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WritablePDOM.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WritablePDOM.java index 21184d1d749..39f849286a1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WritablePDOM.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/WritablePDOM.java @@ -33,26 +33,23 @@ public class WritablePDOM extends PDOM implements IWritableIndexFragment { return super.addFile(filename); } - public void addInclude(IIndexFragmentFile sourceFile, IIndexFragmentFile destFile, - IASTPreprocessorIncludeStatement include) throws CoreException { + public void addFileContent(IIndexFragmentFile sourceFile, + IASTPreprocessorIncludeStatement[] includes, IIndexFragmentFile[] destFiles, + IASTPreprocessorMacroDefinition[] macros, IASTName[] names) throws CoreException { assert sourceFile.getIndexFragment() == this; - assert destFile.getIndexFragment() == this; - ((PDOMFile) sourceFile).addIncludeTo((PDOMFile) destFile, include); - } - - public void addMacro(IIndexFragmentFile sourceFile, IASTPreprocessorMacroDefinition macro) throws CoreException { - assert sourceFile.getIndexFragment() == this; - ((PDOMFile) sourceFile).addMacro(macro); - } - - public void addName(IIndexFragmentFile sourceFile, IASTName name) throws CoreException { - assert sourceFile.getIndexFragment() == this; - PDOMLinkage linkage= createLinkage(name.getLinkage().getID()); - if (linkage == null) { - CCorePlugin.log(MessageFormat.format(Messages.WritablePDOM_error_unknownLinkage, new Object[]{name.getLinkage()})); - } - else { - linkage.addName(name, (PDOMFile) sourceFile); + + PDOMFile pdomFile = (PDOMFile) sourceFile; + pdomFile.addIncludesTo(destFiles, includes); + pdomFile.addMacros(macros); + for (int i = 0; i < names.length; i++) { + IASTName name= names[i]; + PDOMLinkage linkage= createLinkage(name.getLinkage().getID()); + if (linkage == null) { + CCorePlugin.log(MessageFormat.format(Messages.WritablePDOM_error_unknownLinkage, new Object[]{name.getLinkage()})); + } + else { + linkage.addName(name, pdomFile); + } } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java index dfd3f889c9e..10304ebf51f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java @@ -12,7 +12,6 @@ package org.eclipse.cdt.internal.core.pdom.dom; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement; @@ -21,6 +20,7 @@ import org.eclipse.cdt.core.index.IIndexInclude; import org.eclipse.cdt.core.index.IIndexMacro; import org.eclipse.cdt.internal.core.index.IIndexFragment; import org.eclipse.cdt.internal.core.index.IIndexFragmentFile; +import org.eclipse.cdt.internal.core.index.IWritableIndexFragment; import org.eclipse.cdt.internal.core.pdom.PDOM; import org.eclipse.cdt.internal.core.pdom.db.Database; import org.eclipse.cdt.internal.core.pdom.db.IBTreeComparator; @@ -188,23 +188,21 @@ public class PDOMFile implements IIndexFragmentFile { pdom.getDB().putInt(record + FIRST_MACRO, rec); } - public void addMacro(IASTPreprocessorMacroDefinition macro) throws CoreException { - PDOMMacro firstMacro = getFirstMacro(); - - // mstodo revisit: this can probably be done more efficiently - // Make sure we don't already have one - char[] name = macro.getName().toCharArray(); - PDOMMacro pdomMacro = firstMacro; - while (pdomMacro != null) { - if (pdomMacro.getNameInDB().equals(name)) - return; - pdomMacro = pdomMacro.getNextMacro(); + public void addMacros(IASTPreprocessorMacroDefinition[] macros) throws CoreException { + assert getFirstMacro() == null; + + PDOMMacro lastMacro= null; + for (int i = 0; i < macros.length; i++) { + IASTPreprocessorMacroDefinition macro = macros[i]; + PDOMMacro pdomMacro = new PDOMMacro(pdom, macro); + if (lastMacro == null) { + setFirstMacro(pdomMacro); + } + else { + lastMacro.setNextMacro(pdomMacro); + } + lastMacro= pdomMacro; } - - // Nope, add it in - pdomMacro = new PDOMMacro(pdom, macro); - pdomMacro.setNextMacro(getFirstMacro()); - setFirstMacro(pdomMacro); } public void clear() throws CoreException { @@ -236,19 +234,29 @@ public class PDOMFile implements IIndexFragmentFile { setFirstName(null); } - public PDOMInclude addIncludeTo(PDOMFile file, IASTPreprocessorIncludeStatement include) throws CoreException { - PDOMInclude pdomInclude = new PDOMInclude(pdom, include); - pdomInclude.setIncludedBy(this); - pdomInclude.setIncludes(file); + public void addIncludesTo(IIndexFragmentFile[] files, IASTPreprocessorIncludeStatement[] includes) throws CoreException { + assert files.length == includes.length; + assert getFirstInclude() == null; - PDOMInclude firstInclude = getFirstInclude(); - if (firstInclude != null) { - pdomInclude.setNextInIncludes(firstInclude); + PDOMInclude lastInclude= null; + for (int i = 0; i < includes.length; i++) { + IASTPreprocessorIncludeStatement statement = includes[i]; + PDOMFile file= (PDOMFile) files[i]; + assert file.getIndexFragment() instanceof IWritableIndexFragment; + + PDOMInclude pdomInclude = new PDOMInclude(pdom, statement); + pdomInclude.setIncludedBy(this); + pdomInclude.setIncludes(file); + + file.addIncludedBy(pdomInclude); + if (lastInclude == null) { + setFirstInclude(pdomInclude); + } + else { + lastInclude.setNextInIncludes(pdomInclude); + } + lastInclude= pdomInclude; } - setFirstInclude(pdomInclude); - - file.addIncludedBy(pdomInclude); - return pdomInclude; } public void addIncludedBy(PDOMInclude include) throws CoreException { @@ -269,7 +277,6 @@ public class PDOMFile implements IIndexFragmentFile { result.add(include); include = include.getNextInIncludes(); } - Collections.reverse(result); return (IIndexInclude[]) result.toArray(new IIndexInclude[result.size()]); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/PDOMIndexerTask.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/PDOMIndexerTask.java index e48bb506cb4..a3f5c13915b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/PDOMIndexerTask.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/PDOMIndexerTask.java @@ -20,6 +20,9 @@ import java.util.Map; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.dom.IPDOMIndexerTask; +import org.eclipse.cdt.core.dom.ast.IASTName; +import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement; +import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition; import org.eclipse.cdt.core.index.IIndex; import org.eclipse.cdt.core.index.IIndexFile; import org.eclipse.cdt.core.index.IIndexInclude; @@ -42,7 +45,7 @@ import org.eclipse.core.runtime.Platform; public abstract class PDOMIndexerTask implements IPDOMIndexerTask { private static final Object NO_CONTEXT = new Object(); - protected static final int MAX_ERRORS = 10; + protected static final int MAX_ERRORS = 500; protected volatile int fTotalSourcesEstimate= 0; protected volatile int fCompletedSources= 0; @@ -92,7 +95,7 @@ public abstract class PDOMIndexerTask implements IPDOMIndexerTask { } protected void collectSources(ICProject project, final Collection sources, final Collection headers, final boolean allFiles) throws CoreException { - fMessage= Messages.PDOMIndexerTask_collectingFilesTask; + fMessage= MessageFormat.format(Messages.PDOMIndexerTask_collectingFilesTask, new Object[]{project.getElementName()}); project.accept(new ICElementVisitor() { public boolean visit(ICElement element) throws CoreException { switch (element.getElementType()) { @@ -239,4 +242,28 @@ public abstract class PDOMIndexerTask implements IPDOMIndexerTask { public int getCompletedSourcesCount() { return fCompletedSources; } + + protected IIndexFragmentFile addToIndex(IWritableIndex index, String location, ArrayList[] lists) throws CoreException { + // Remove the old symbols in the tu + Path path= new Path(location); + IIndexFragmentFile file= (IIndexFragmentFile) index.getFile(path); + if (file != null) { + index.clearFile(file); + } + else { + file= index.addFile(path); + } + file.setTimestamp(path.toFile().lastModified()); + if (lists != null) { + ArrayList list= lists[0]; + IASTPreprocessorIncludeStatement[] includes= (IASTPreprocessorIncludeStatement[]) list.toArray(new IASTPreprocessorIncludeStatement[list.size()]); + list= lists[1]; + IASTPreprocessorMacroDefinition[] macros= (IASTPreprocessorMacroDefinition[]) list.toArray(new IASTPreprocessorMacroDefinition[list.size()]); + list= lists[2]; + IASTName[] names= (IASTName[]) list.toArray(new IASTName[list.size()]); + + index.setFileContent(file, includes, macros, names); + } + return file; + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastIndexerJob.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastIndexerJob.java index 500f55921d3..20e0ea0a266 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastIndexerJob.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastIndexerJob.java @@ -33,7 +33,6 @@ import org.eclipse.cdt.core.model.ILanguage; import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.cdt.core.parser.CodeReader; import org.eclipse.cdt.core.parser.IScannerInfo; -import org.eclipse.cdt.internal.core.index.IIndexFragmentFile; import org.eclipse.cdt.internal.core.index.IWritableIndex; import org.eclipse.cdt.internal.core.index.IWritableIndexManager; import org.eclipse.cdt.internal.core.index.IndexBasedCodeReaderFactory; @@ -42,7 +41,6 @@ import org.eclipse.cdt.internal.core.pdom.indexer.PDOMIndexerTask; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; /** * @author Doug Schaefer @@ -205,7 +203,7 @@ abstract class PDOMFastIndexerJob extends PDOMIndexerTask implements IPDOMIndexe if (fTrace) { System.out.println("Indexer: adding " + path); //$NON-NLS-1$ } - addToIndex(path, info, (ArrayList[]) symbolMap.get(path)); + info.fFile= addToIndex(index, path, (ArrayList[]) symbolMap.get(path)); if (isFirstAddition) isFirstAddition= false; @@ -227,50 +225,6 @@ abstract class PDOMFastIndexerJob extends PDOMIndexerTask implements IPDOMIndexe lists[idx].add(thing); } - private void addToIndex(String location, FileInfo info, ArrayList[] lists) throws CoreException { - // Remove the old symbols in the tu - Path path= new Path(location); - IIndexFragmentFile file= (IIndexFragmentFile) info.fFile; - if (file != null) { - index.clearFile(file); - } - else { - file= index.addFile(path); - info.fFile= file; - } - file.setTimestamp(path.toFile().lastModified()); - - if (lists != null) { - // includes - ArrayList list= lists[0]; - for (int i = 0; i < list.size(); i++) { - IASTPreprocessorIncludeStatement include= (IASTPreprocessorIncludeStatement) list.get(i); - IIndexFragmentFile destFile= createIndexFile(include.getPath()); - index.addInclude(file, destFile, include); - } - - // macros - list= lists[1]; - for (int i = 0; i < list.size(); i++) { - index.addMacro(file, (IASTPreprocessorMacroDefinition) list.get(i)); - } - - // symbols - list= lists[2]; - for (int i = 0; i < list.size(); i++) { - index.addName(file, (IASTName) list.get(i)); - } - } - } - - private IIndexFragmentFile createIndexFile(String path) throws CoreException { - FileInfo info= codeReaderFactory.createFileInfo(path); - if (info.fFile == null) { - info.fFile= index.addFile(new Path(path)); - } - return (IIndexFragmentFile) info.fFile; - } - protected void parseTUs(List sources, List headers, IProgressMonitor monitor) throws CoreException, InterruptedException { // sources first Iterator iter; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java index 4c11f0b50e1..4f2951541f1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/full/PDOMFullIndexerJob.java @@ -30,14 +30,12 @@ import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorMacroDefinition; import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; import org.eclipse.cdt.core.model.ITranslationUnit; -import org.eclipse.cdt.internal.core.index.IIndexFragmentFile; import org.eclipse.cdt.internal.core.index.IWritableIndex; import org.eclipse.cdt.internal.core.index.IWritableIndexManager; import org.eclipse.cdt.internal.core.pdom.indexer.PDOMIndexerTask; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; /** * @author Doug Schaefer @@ -219,7 +217,7 @@ abstract class PDOMFullIndexerJob extends PDOMIndexerTask implements IPDOMIndexe if (fTrace) System.out.println("Indexer: adding " + path); //$NON-NLS-1$ - addToIndex(path, (ArrayList[]) entry.getValue()); + addToIndex(index, path, (ArrayList[]) entry.getValue()); if (isFirstAddition) isFirstAddition= false; @@ -248,37 +246,4 @@ abstract class PDOMFullIndexerJob extends PDOMIndexerTask implements IPDOMIndexe lists[idx].add(thing); } } - - private void addToIndex(String location, ArrayList[] lists) throws CoreException { - // Remove the old symbols in the tu - Path path= new Path(location); - IIndexFragmentFile file= (IIndexFragmentFile) index.getFile(new Path(location)); - if (file != null) { - index.clearFile(file); - } - else { - file= index.addFile(path); - } - file.setTimestamp(path.toFile().lastModified()); - - // includes - ArrayList list= lists[0]; - for (int i = 0; i < list.size(); i++) { - IASTPreprocessorIncludeStatement include= (IASTPreprocessorIncludeStatement) list.get(i); - IIndexFragmentFile destFile= index.addFile(new Path(include.getPath())); - index.addInclude(file, destFile, include); - } - - // macros - list= lists[1]; - for (int i = 0; i < list.size(); i++) { - index.addMacro(file, (IASTPreprocessorMacroDefinition) list.get(i)); - } - - // symbols - list= lists[2]; - for (int i = 0; i < list.size(); i++) { - index.addName(file, (IASTName) list.get(i)); - } - } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/messages.properties b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/messages.properties index 13bfcee9eaf..c33dc17a58f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/messages.properties +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/messages.properties @@ -1,3 +1,3 @@ -PDOMIndexerTask_collectingFilesTask=Collecting files to parse +PDOMIndexerTask_collectingFilesTask=Collecting files to parse (project ''{0}'') PDOMIndexerTask_parsingFileTask=parsing {0} ({1}) PDOMIndexerTask_errorWhileParsing=Error while parsing {0}.