Package com.e1c.langtool.storage.regex
Class YamlRegExFile
java.lang.Object
com.e1c.langtool.storage.regex.AbstractRegExtFileEditor<RegExSettings>
com.e1c.langtool.storage.regex.YamlRegExFile
- All Implemented Interfaces:
IFileEditor<RegExSettings>,RegExFile
-
Field Summary
Fields inherited from class com.e1c.langtool.storage.regex.AbstractRegExtFileEditor
file -
Constructor Summary
ConstructorsConstructorDescriptionYamlRegExFile(String languageCode, org.eclipse.core.resources.IFile file, String comment) -
Method Summary
Modifier and TypeMethodDescriptionvoidgetData()Gets file model data.getItems()getTranslation(ITranslationStorageProvider.DictionaryStorage dictionary, TranslationKey source, TranslateLanguage language) booleanisDirty()Checks if the file is dirty.booleanisEmpty()Returnstrueif no translations stored in this file.voidload()Load from the resource file.voidMark the file as dirty.voidremoveAllItems(String regExText) voidremoveItem(RegExItem item) byte[]save(com.google.common.hash.HashFunction hashFunction, org.eclipse.core.runtime.IProgressMonitor monitor) Store translations to the file.voidsave(org.eclipse.core.runtime.IProgressMonitor monitor) Store translations to the file.Methods inherited from class com.e1c.langtool.storage.regex.AbstractRegExtFileEditor
delete, getFileMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.e1c.langtool.storage.IFileEditor
delete, getFile
-
Constructor Details
-
YamlRegExFile
-
-
Method Details
-
getData
Description copied from interface:IFileEditorGets file model data.- Specified by:
getDatain interfaceIFileEditor<RegExSettings>- Returns:
- the file model data, cannot return
null.
-
save
Description copied from interface:IFileEditorStore translations to the file.- Specified by:
savein interfaceIFileEditor<RegExSettings>- Parameters:
monitor- the monitor- Throws:
IOException- Signals that an I/O exception has occurred.
-
save
public byte[] save(com.google.common.hash.HashFunction hashFunction, org.eclipse.core.runtime.IProgressMonitor monitor) throws IOException Description copied from interface:IFileEditorStore translations to the file.- Specified by:
savein interfaceIFileEditor<RegExSettings>monitor- the monitor- Throws:
IOException- Signals that an I/O exception has occurred.
-
isDirty
public boolean isDirty()Description copied from interface:IFileEditorChecks if the file is dirty.- Specified by:
isDirtyin interfaceIFileEditor<RegExSettings>- Overrides:
isDirtyin classAbstractRegExtFileEditor<RegExSettings>- Returns:
- the boolean
-
markDirty
public void markDirty()Description copied from interface:IFileEditorMark the file as dirty.- Specified by:
markDirtyin interfaceIFileEditor<RegExSettings>- Overrides:
markDirtyin classAbstractRegExtFileEditor<RegExSettings>
-
load
public void load()Description copied from interface:IFileEditorLoad from the resource file.- Specified by:
loadin interfaceIFileEditor<RegExSettings>
-
getItems
-
addItem
-
removeItem
- Specified by:
removeItemin interfaceRegExFile
-
removeAllItems
- Specified by:
removeAllItemsin interfaceRegExFile
-
getTranslation
public String getTranslation(ITranslationStorageProvider.DictionaryStorage dictionary, TranslationKey source, TranslateLanguage language) - Specified by:
getTranslationin interfaceRegExFile
-
isEmpty
public boolean isEmpty()Description copied from interface:IFileEditorReturnstrueif no translations stored in this file.- Specified by:
isEmptyin interfaceIFileEditor<RegExSettings>- Returns:
trueif no translations stored in this file,falseotherwise.
-