Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/nd/indexer/JavaIndexTestUtil.java')
-rw-r--r--org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/nd/indexer/JavaIndexTestUtil.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/nd/indexer/JavaIndexTestUtil.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/nd/indexer/JavaIndexTestUtil.java
new file mode 100644
index 000000000..84a1cd7c0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/nd/indexer/JavaIndexTestUtil.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2015, 2016 Google, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Stefan Xenos (Google) - Initial implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.nd.indexer;
+
+import java.io.File;
+
+import org.eclipse.jdt.core.tests.nd.DatabaseTestUtil;
+import org.eclipse.jdt.internal.core.nd.db.ChunkCache;
+import org.eclipse.jdt.internal.core.nd.java.JavaIndex;
+
+public class JavaIndexTestUtil {
+ public static JavaIndex createTempIndex(String id) {
+ File dbName = DatabaseTestUtil.getTempDbName(id);
+ return JavaIndex.getIndex(JavaIndex.createNd(dbName, new ChunkCache()));
+ }
+}

Back to the top