Package com.e1c.langtool.ui.editor
Class StorageMediator
java.lang.Object
com.e1c.langtool.ui.editor.StorageMediator
- All Implemented Interfaces:
TranslationEditingContext
-
Constructor Summary
ConstructorsConstructorDescriptionStorageMediator(ITranslatingProject project, IFeatureValueCollectingService collectingService, TranslationSource source) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangeListener(TranslationChangeListener listener) voidcollectValues(org.eclipse.core.runtime.IProgressMonitor monitor) protected voidfinalize()protected voidfireTranslationChange(ChangeEvent event) Notifies any translation changed listeners that the storage mediator's translation has changed.protected Map<Pair<TranslationKey,TranslateLanguage>, String> Gets the storage which is editing in this context.getTranslation(FeatureValue value, TranslateLanguage language) Gets the translation.protected Map<Pair<TranslationKey,TranslateLanguage>, String> booleanisDirty()protected booleanisSaving()voidvoidsave(org.eclipse.core.runtime.IProgressMonitor monitor) protected voidsetSaving(boolean saving) voidvoidsetTranslation(FeatureValue value, TranslateLanguage language, String translation) Sets the translation.voidupdateTree(boolean isHierarhical)
-
Constructor Details
-
StorageMediator
public StorageMediator(ITranslatingProject project, IFeatureValueCollectingService collectingService, TranslationSource source)
-
-
Method Details
-
setStorage
-
getLanguages
-
getProject
-
addChangeListener
-
removeChangeListener
-
collectValues
public void collectValues(org.eclipse.core.runtime.IProgressMonitor monitor) -
getValues
-
getTranslation
Description copied from interface:TranslationEditingContextGets the translation.- Specified by:
getTranslationin interfaceTranslationEditingContext- Parameters:
value- the feature valuelanguage- the language- Returns:
- the translation
-
setTranslation
Description copied from interface:TranslationEditingContextSets the translation.- Specified by:
setTranslationin interfaceTranslationEditingContext- Parameters:
value- the feature valuetranslation- the translation
-
getFeatureTree
-
updateTree
public void updateTree(boolean isHierarhical) -
isDirty
public boolean isDirty() -
save
public void save(org.eclipse.core.runtime.IProgressMonitor monitor) -
fireTranslationChange
Notifies any translation changed listeners that the storage mediator's translation has changed. Only listeners registered at the time this method is called are notified.- Parameters:
event- a changed event- See Also:
-
finalize
-
getModified
-
getTranslations
-
isSaving
protected boolean isSaving() -
setSaving
protected void setSaving(boolean saving) -
getStorage
Description copied from interface:TranslationEditingContextGets the storage which is editing in this context.- Specified by:
getStoragein interfaceTranslationEditingContext- Returns:
- the storage
-