java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.nd.java.JavaIndex

public class JavaIndex extends Object
  • Field Details

  • Constructor Details

    • JavaIndex

      public JavaIndex(Nd dom, long address)
  • Method Details

    • getResourceFile

      public NdResourceFile getResourceFile(char[] location)
      Returns the most-recently-scanned resource file with the given name or null if none
    • isUpToDate

      public boolean isUpToDate(NdResourceFile file) throws org.eclipse.core.runtime.CoreException
      Returns true iff the given resource file is up-to-date with the filesystem. Returns false if the argument is null or there is a possibility it being out-of-date with the file system.
      Parameters:
      file - the index file to look up or null
      Throws:
      org.eclipse.core.runtime.CoreException
    • dirty

      public void dirty(String location)
    • findResourcesWithPath

      public List<NdResourceFile> findResourcesWithPath(String thePath)
    • getAllResourceFiles

      public List<NdResourceFile> getAllResourceFiles()
    • findType

      public NdTypeId findType(char[] fieldDescriptor)
    • findTypesBySimpleName

      public List<NdTypeId> findTypesBySimpleName(char[] query)
    • findTypesBySimpleName

      public List<NdTypeId> findTypesBySimpleName(char[] query, int count)
    • visitFieldDescriptorsStartingWith

      public boolean visitFieldDescriptorsStartingWith(char[] fieldDescriptorPrefix, FieldSearchIndex.Visitor<NdTypeId> visitor)
    • createTypeId

      public NdTypeId createTypeId(char[] fieldDescriptor)
      Returns a type ID or creates a new one if it does not exist. The caller must attach a reference to it after calling this method or it may leak.
    • getNd

      public Nd getNd()
    • getLocationForPath

      public static org.eclipse.core.runtime.IPath getLocationForPath(org.eclipse.core.runtime.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.

      The logic used in getLocationForPath(IPath), getLocationForElement(IJavaElement), and JavaModelManager.getLocalFile(IPath) should be equivalent.

    • getLocationForElement

      public static org.eclipse.core.runtime.IPath getLocationForElement(IJavaElement next)
      Returns the absolute filesystem location of the given element or the empty path if none

      The logic used in getLocationForPath(IPath), getLocationForElement(IJavaElement), and JavaModelManager.getLocalFile(IPath) should be equivalent.

    • isEnabled

      public static boolean isEnabled()
      Returns:
      always return false see bug 544898. New index is disabled now.
    • createNd

      public static Nd createNd(File databaseFile, ChunkCache chunkCache)
    • getGlobalNd

      public static Nd getGlobalNd()
    • getIndex

      public static JavaIndex getIndex(Nd nd)
    • getIndex

      public static JavaIndex getIndex()
    • getCurrentVersion

      public static int getCurrentVersion()