diff options
| author | Sergey Prigogin | 2011-07-22 01:27:37 +0000 |
|---|---|---|
| committer | Sergey Prigogin | 2011-07-22 01:32:04 +0000 |
| commit | 6d8a98e790f43626bab61125f3228dc96248baa9 (patch) | |
| tree | 56e4199bc57450fd84cc25f6b7e92c0085062900 | |
| parent | 48646a0cbda2b22e427a66848bf18969e32efd7b (diff) | |
| download | org.eclipse.cdt-6d8a98e790f43626bab61125f3228dc96248baa9.tar.gz org.eclipse.cdt-6d8a98e790f43626bab61125f3228dc96248baa9.tar.xz org.eclipse.cdt-6d8a98e790f43626bab61125f3228dc96248baa9.zip | |
Bug 351271. Code simplification suggested by Markus Schorn.
4 files changed, 1 insertions, 19 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java index 0d7612f957e..3dcc9c10df4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/StandaloneIndexerInputAdapter.java @@ -75,11 +75,6 @@ public class StandaloneIndexerInputAdapter extends IndexerInputAdapter { } @Override - public boolean isIndexedUnconditionally(Object tu) { - return false; - } - - @Override public boolean isIndexedUnconditionally(IIndexFileLocation ifl) { return false; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/AbstractIndexerTask.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/AbstractIndexerTask.java index 522658a6cd7..52c0ed51bdc 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/AbstractIndexerTask.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/AbstractIndexerTask.java @@ -485,7 +485,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter { final boolean isExcludedSource= isSourceUnit && !fIndexFilesWithoutConfiguration && !fResolver.isFileBuildConfigured(tu); if ((isSourceUnit && !isExcludedSource) || fIndexHeadersWithoutContext != UnusedHeaderStrategy.skip || - fResolver.isIndexedUnconditionally(tu)) { + fResolver.isIndexedUnconditionally(ifl)) { // Headers or sources required with a specific linkage AbstractLanguage[] langs= fResolver.getLanguages(tu, fIndexHeadersWithoutContext == UnusedHeaderStrategy.useBoth); for (AbstractLanguage lang : langs) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/IndexerInputAdapter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/IndexerInputAdapter.java index 3d520888515..26efb9e36b3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/IndexerInputAdapter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/IndexerInputAdapter.java @@ -56,13 +56,6 @@ public abstract class IndexerInputAdapter extends ASTFilePathResolver { public abstract boolean isIndexedOnlyIfIncluded(Object tu); /** - * Checks whether the given translation unit should be indexed unconditionally. - * @param tu An ITranslationUnit or a file location in String form. - * @return {@code true} if the translation unit should be indexed unconditionally. - */ - public abstract boolean isIndexedUnconditionally(Object tu); - - /** * Checks whether the given file should be indexed unconditionally. * @param ifl The Location of the file. * @return {@code true} if the file should be indexed unconditionally. diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/ProjectIndexerInputAdapter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/ProjectIndexerInputAdapter.java index 37441912ecc..2c712127471 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/ProjectIndexerInputAdapter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/ProjectIndexerInputAdapter.java @@ -243,12 +243,6 @@ public class ProjectIndexerInputAdapter extends IndexerInputAdapter { } @Override - public boolean isIndexedUnconditionally(Object tuo) { - ITranslationUnit tu= (ITranslationUnit) tuo; - return isIndexedUnconditionally(IndexLocationFactory.getIFL(tu)); - } - - @Override public boolean isIndexedUnconditionally(IIndexFileLocation ifl) { return CCoreInternals.getPDOMManager().isFileIndexedUnconditionally(ifl); } |
