Class DictionaryFormatFactory

java.lang.Object
com.e1c.langtool.storage.dictionary.DictionaryFormatFactory
All Implemented Interfaces:
ITranslationFileEditorFactory<DictionaryData>

public class DictionaryFormatFactory extends Object implements ITranslationFileEditorFactory<DictionaryData>
A factory for creating IFileEditor editor of the DictionaryData object by file and the project
  • Field Details

  • Constructor Details

  • Method Details

    • createEditor

      public IFileEditor<? extends DictionaryData> createEditor(org.eclipse.core.resources.IFile file, org.eclipse.core.resources.IProject project, DictionaryStorageSettings settings, TranslateLanguage language)
      Creates a new file editor of the dictionary data object.
      Parameters:
      file - the file of the dictionary data to load form, cannot be null.
      project - the translating project, my be different form the project of the file, cannot be null.
      settings - the dictionary settings, cannot be null.
      language - the language, cannot be null.
      Returns:
      the file editor of dictionary data, can return null if file format from settings is not supported.
    • isFormatSupported

      public static boolean isFormatSupported(String format)
      Checks if the file format exists and supports.
      Parameters:
      format - the format, cannot be null.
      Returns:
      true, if the format supported
    • getFileEditor

      public IFileEditor<DictionaryData> getFileEditor(org.eclipse.core.resources.IFile file, org.eclipse.core.resources.IProject project, TranslateLanguage language)
      Description copied from interface: ITranslationFileEditorFactory
      Gets the file editing handler.
      Specified by:
      getFileEditor in interface ITranslationFileEditorFactory<DictionaryData>
      Parameters:
      file - the file, cannot be null.
      project - the project, cannot be null.
      language - the language, cannot be null.
      Returns:
      the file editor, cannot return null.