Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2007-02-22 17:03:41 +0000
committerMarkus Schorn2007-02-22 17:03:41 +0000
commitd811dbadb353f1e984a518563a9203fbe9c46355 (patch)
treede6ffe6abaa62c9fc59b3701f3ce623a5ee985aa
parent8233d713c906e5f7726e0f977f20b48cf3f85d0c (diff)
downloadorg.eclipse.cdt-d811dbadb353f1e984a518563a9203fbe9c46355.tar.gz
org.eclipse.cdt-d811dbadb353f1e984a518563a9203fbe9c46355.tar.xz
org.eclipse.cdt-d811dbadb353f1e984a518563a9203fbe9c46355.zip
Configure indexer in JUnit tests before project creation.
-rw-r--r--core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java
index 81cb7ad8612..87bae29475d 100644
--- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java
+++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/testplugin/CProjectHelper.java
@@ -32,7 +32,6 @@ import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.ISourceRoot;
import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.internal.core.CCoreInternals;
import org.eclipse.cdt.internal.core.pdom.indexer.IndexerPreferences;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@@ -81,6 +80,10 @@ public class CProjectHelper {
public void run(IProgressMonitor monitor) throws CoreException {
IWorkspaceRoot root = ws.getRoot();
IProject project = root.getProject(projectName);
+ if (indexerID != null) {
+ IndexerPreferences.set(project, IndexerPreferences.KEY_INDEX_ALL_FILES, "true");
+ IndexerPreferences.set(project, IndexerPreferences.KEY_INDEXER_ID, indexerID);
+ }
if (!project.exists()) {
project.create(null);
} else {
@@ -95,10 +98,6 @@ public class CProjectHelper {
CCorePlugin.getDefault().mapCProjectOwner(project, projectId, false);
}
newProject[0] = CCorePlugin.getDefault().getCoreModel().create(project);
- if (indexerID != null) {
- IndexerPreferences.set(newProject[0].getProject(), IndexerPreferences.KEY_INDEX_ALL_FILES, "true");
- CCoreInternals.getPDOMManager().setIndexerId(newProject[0], indexerID);
- }
}
}, null);

Back to the top