public class JavaIndex
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static FieldSearchIndex<NdResourceFile> |
FILES |
static FieldSearchIndex<NdTypeId> |
SIMPLE_INDEX |
static StructDef<JavaIndex> |
type |
static FieldSearchIndex<NdTypeId> |
TYPES |
| Modifier and Type | Method and Description |
|---|---|
static Nd |
createNd(java.io.File databaseFile,
ChunkCache chunkCache) |
NdTypeId |
createTypeId(char[] fieldDescriptor)
Returns a type ID or creates a new one if it does not exist.
|
void |
dirty(java.lang.String location) |
java.util.List<NdResourceFile> |
findResourcesWithPath(java.lang.String thePath) |
NdTypeId |
findType(char[] fieldDescriptor) |
java.util.List<NdTypeId> |
findTypesBySimpleName(char[] query) |
java.util.List<NdTypeId> |
findTypesBySimpleName(char[] query,
int count) |
java.util.List<NdResourceFile> |
getAllResourceFiles() |
static int |
getCurrentVersion() |
static Nd |
getGlobalNd() |
static JavaIndex |
getIndex() |
static JavaIndex |
getIndex(Nd nd) |
static IPath |
getLocationForElement(IJavaElement next)
Returns the absolute filesystem location of the given element or the empty path if none
|
static IPath |
getLocationForPath(IPath path)
Converts a JDT-style path (which may be a resource-relative path or absolute filesystem location) into a location
(which is unconditionally a filesystem location) or null if none.
|
Nd |
getNd() |
NdResourceFile |
getResourceFile(char[] location)
Returns the most-recently-scanned resource file with the given name or null if none
|
static boolean |
isEnabled() |
boolean |
isUpToDate(NdResourceFile file)
Returns true iff the given resource file is up-to-date with the filesystem.
|
boolean |
visitFieldDescriptorsStartingWith(char[] fieldDescriptorPrefix,
FieldSearchIndex.Visitor<NdTypeId> visitor) |
public static final FieldSearchIndex<NdResourceFile> FILES
public static final FieldSearchIndex<NdTypeId> SIMPLE_INDEX
public static final FieldSearchIndex<NdTypeId> TYPES
public JavaIndex(Nd dom, long address)
public NdResourceFile getResourceFile(char[] location)
public boolean isUpToDate(NdResourceFile file) throws CoreException
file - the index file to look up or nullCoreExceptionpublic void dirty(java.lang.String location)
public java.util.List<NdResourceFile> findResourcesWithPath(java.lang.String thePath)
public java.util.List<NdResourceFile> getAllResourceFiles()
public NdTypeId findType(char[] fieldDescriptor)
public java.util.List<NdTypeId> findTypesBySimpleName(char[] query)
public java.util.List<NdTypeId> findTypesBySimpleName(char[] query, int count)
public boolean visitFieldDescriptorsStartingWith(char[] fieldDescriptorPrefix,
FieldSearchIndex.Visitor<NdTypeId> visitor)
public NdTypeId createTypeId(char[] fieldDescriptor)
public Nd getNd()
public static IPath getLocationForPath(IPath path)
The logic used in getLocationForPath(IPath), getLocationForElement(IJavaElement), and
JavaModelManager.getLocalFile(IPath) should be equivalent.
public static IPath getLocationForElement(IJavaElement next)
The logic used in getLocationForPath(IPath), getLocationForElement(IJavaElement), and
JavaModelManager.getLocalFile(IPath) should be equivalent.
public static boolean isEnabled()
false see bug 544898. New index is disabled now.public static Nd createNd(java.io.File databaseFile, ChunkCache chunkCache)
public static Nd getGlobalNd()
public static JavaIndex getIndex()
public static int getCurrentVersion()