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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDictionaryFormatFactory(DictionaryStorageSettings settings, ITranslatingProjectManager translatingProjectManager, IStorageSettingsManager storageSettingsManager, ITranslationStorageManager translationStorageManager) -
Method Summary
Modifier and TypeMethodDescriptionIFileEditor<? 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.getFileEditor(org.eclipse.core.resources.IFile file, org.eclipse.core.resources.IProject project, TranslateLanguage language) Gets the file editing handler.static booleanisFormatSupported(String format) Checks if the file format exists and supports.
-
Field Details
-
FORMAT_DICT
- See Also:
-
FORMAT_REGEX
- See Also:
-
FORMAT_PO
- See Also:
-
-
Constructor Details
-
DictionaryFormatFactory
public DictionaryFormatFactory(DictionaryStorageSettings settings, ITranslatingProjectManager translatingProjectManager, IStorageSettingsManager storageSettingsManager, ITranslationStorageManager translationStorageManager)
-
-
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 benull.project- the translating project, my be different form the project of the file, cannot benull.settings- the dictionary settings, cannot benull.language- the language, cannot benull.- Returns:
- the file editor of dictionary data, can return
nullif file format from settings is not supported.
-
isFormatSupported
Checks if the file format exists and supports.- Parameters:
format- the format, cannot benull.- 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:ITranslationFileEditorFactoryGets the file editing handler.- Specified by:
getFileEditorin interfaceITranslationFileEditorFactory<DictionaryData>- Parameters:
file- the file, cannot benull.project- the project, cannot benull.language- the language, cannot benull.- Returns:
- the file editor, cannot return
null.
-