Interface ITranslationsFile
- All Known Implementing Classes:
QnTranslationsFile,TranslationFileRows,UniqueDictTranslationsFile
public interface ITranslationsFile
The Interface ITranslationsFile.
Resource file with translations.
-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Delete storage file, associated with this object.getComment(FeatureKey featureKey) Gets the comment for the key.org.eclipse.core.resources.IFilegetFile()Gets the file.Gets the language code of the file.getTranslation(FeatureKey featureKey) Gets the translation by the key.getTranslationKeys(String value) Gets the translation keys with the same value.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.removeTranslation(FeatureKey featureKey) Removes the translation.voidsetComment(String generateComment) Sets the comment of the file.voidsetFile(org.eclipse.core.resources.IFile file) Sets the resource file to store.setTranslation(FeatureKey featureKey, String value, String comment) Sets the translation.voidstore(org.eclipse.core.runtime.IProgressMonitor monitor) Store translations to the file.
-
Method Details
-
store
Store translations to the file.- Parameters:
monitor- the monitor- Throws:
IOException- Signals that an I/O exception has occurred.
-
getLanguageCode
String getLanguageCode()Gets the language code of the file.- Returns:
- the language code
-
setTranslation
Sets the translation.- Parameters:
featureKey- the feature keyvalue- the valuecomment- the comment- Returns:
- the previous value of the specified key in this hashtable,
or
nullif it did not have one
-
getTranslation
Gets the translation by the key.- Parameters:
featureKey- the feature key- Returns:
- the translation
-
removeTranslation
Removes the translation.- Parameters:
featureKey- the feature key- Returns:
- the previous value associated with key, or
nullif there was no mapping for key.
-
isEmpty
boolean isEmpty()Returnstrueif no translations stored in this file.- Returns:
trueif no translations stored in this file,falseotherwise.
-
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. -
getTranslationKeys
Gets the translation keys with the same value.- Parameters:
value- the value- Returns:
- the translation keys
-
getFile
org.eclipse.core.resources.IFile getFile()Gets the file.- Returns:
- the file
-
setFile
void setFile(org.eclipse.core.resources.IFile file) Sets the resource file to store.- Parameters:
file- the new file
-
setComment
Sets the comment of the file.- Parameters:
generateComment- the new comment
-
getComment
Gets the comment for the key.- Parameters:
featureKey- the feature key- Returns:
- the comment
-