Class ProjectContentCache

java.lang.Object
com.e1c.langtool.v8.dt.bsl.i18n.internal.cache.ProjectContentCache

public class ProjectContentCache extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProjectContentCache(org.eclipse.core.resources.IProject project, File file)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(org.eclipse.core.resources.IFile file)
    Examine if cache contains data for given file.
    void
     
    get(org.eclipse.core.resources.IFile file)
    Retrieve cached content for given file.
    org.eclipse.core.resources.IProject
     
    void
     
    boolean
    invalidate(org.eclipse.core.resources.IFile file)
    Invalidate cache for given file.
    void
    put(org.eclipse.core.resources.IFile file, String content)
    Store content associated with file.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProjectContentCache

      public ProjectContentCache(org.eclipse.core.resources.IProject project, File file)
  • Method Details

    • init

      public void init() throws Exception
      Throws:
      Exception
    • dispose

      public void dispose()
    • getProject

      public org.eclipse.core.resources.IProject getProject()
    • contains

      public boolean contains(org.eclipse.core.resources.IFile file)
      Examine if cache contains data for given file.
      Parameters:
      file -
      Returns:
      true if cache contains content associated with given file, false otherwise.
    • get

      public String get(org.eclipse.core.resources.IFile file)
      Retrieve cached content for given file. If cache has no content for given file then null will be returned.
      Parameters:
      file -
      Returns:
      Cached content or null if no content found in cache.
    • invalidate

      public boolean invalidate(org.eclipse.core.resources.IFile file)
      Invalidate cache for given file.
      Parameters:
      file - File to be invalidated
    • put

      public void put(org.eclipse.core.resources.IFile file, String content)
      Store content associated with file.
      Parameters:
      file - File to be added to the cache
      content - Cached file content