Interface IFileEditor<T>

Type Parameters:
T - the type of the file data model
All Known Subinterfaces:
RegExFile
All Known Implementing Classes:
AbstractPropertiesFileEditor, AbstractRegExtFileEditor, PropertiesContextFileEditor, PropertiesDictionaryFileEditor, RegExDictionaryFileEditor, YamlRegExFile

public interface IFileEditor<T>
The common interface of file editor handler that responsible for load, save, delete and track changes of the file model content. Implementations should use in file mediator obtain model data. This interface should not be independently use to edit file.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Delete storage file, associated with this object.
    Gets file model data.
    org.eclipse.core.resources.IFile
    Gets the file that was loaded.
    boolean
    Checks if the file is dirty.
    boolean
    Returns true if no translations stored in this file.
    void
    Load from the resource file.
    void
    Mark the file as dirty.
    byte[]
    save(com.google.common.hash.HashFunction hashFunction, org.eclipse.core.runtime.IProgressMonitor monitor)
    Store translations to the file.
    void
    save(org.eclipse.core.runtime.IProgressMonitor monitor)
    Store translations to the file.
  • Method Details

    • save

      byte[] save(com.google.common.hash.HashFunction hashFunction, org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException
      Store translations to the file.
      Parameters:
      monitor - the monitor
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • save

      void save(org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException
      Store translations to the file.
      Parameters:
      monitor - the monitor
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • isEmpty

      boolean isEmpty()
      Returns true if no translations stored in this file.
      Returns:
      true if no translations stored in this file, false otherwise.
    • isDirty

      boolean isDirty()
      Checks if the file is dirty.
      Returns:
      the boolean
    • markDirty

      void markDirty()
      Mark the file as dirty.
    • load

      void load()
      Load from the resource file.
    • delete

      void delete()
      Delete storage file, associated with this object.
    • getFile

      org.eclipse.core.resources.IFile getFile()
      Gets the file that was loaded.
      Returns:
      the file
    • getData

      T getData()
      Gets file model data.
      Returns:
      the file model data, cannot return null.