Class SingleLanguageFeatureValueItem
java.lang.Object
com.e1c.langtool.ui.tree.FeatureValueItem
com.e1c.langtool.internal.ui.view.SingleLanguageFeatureValueItem
- All Implemented Interfaces:
IApplicable,IContextTranslationQuery,ISingleTranslationQuery,IFeatureValueItem,ITreeItem
- Direct Known Subclasses:
LanguageFeatureValueItem
public class SingleLanguageFeatureValueItem
extends FeatureValueItem
implements IContextTranslationQuery, IApplicable
The Class represents
IFeatureValueItem when the tree has only one language to translate into.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final IEditingContextprotected final TranslateLanguageprotected final TranslateLanguageFields inherited from class com.e1c.langtool.ui.tree.FeatureValueItem
value -
Constructor Summary
ConstructorsConstructorDescriptionSingleLanguageFeatureValueItem(ITreeItem parent, FeatureValue value, int skipKeySegments, TranslateLanguage sourceLanguage, TranslateLanguage targetLanguage, IEditingContext context, org.eclipse.core.resources.IProject project, StorageID storageId, ITranslationStorageManager storageManager, ValidatorRegistry registry) Instantiates a new single language feature value item. -
Method Summary
Modifier and TypeMethodDescriptionvoidApplies a translation value.Returns the name of project for which the translations will be searched.Returns the translation storage id.getText()Returns the text to translate.booleanMethods inherited from class com.e1c.langtool.ui.tree.FeatureValueItem
getFeatureValue, getParent, getPresentation, getSkippedKeySegments, isFeatureValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.e1c.langtool.query.IContextTranslationQuery
getFeatureValue
-
Field Details
-
targetLanguage
-
sourceLanguage
-
context
-
-
Constructor Details
-
SingleLanguageFeatureValueItem
public SingleLanguageFeatureValueItem(ITreeItem parent, FeatureValue value, int skipKeySegments, TranslateLanguage sourceLanguage, TranslateLanguage targetLanguage, IEditingContext context, org.eclipse.core.resources.IProject project, StorageID storageId, ITranslationStorageManager storageManager, ValidatorRegistry registry) Instantiates a new single language feature value item.- Parameters:
parent- the parent itemvalue- the feature valueskipKeySegments- the skip key segmentssourceLanguage- the source languagetargetLanguage- the target languagecontext- the contextproject- the projectstorageId- the storage idstorageManager- the storage managerregistry- the registry
-
-
Method Details
-
getSourceLanguage
-
getTargetLanguage
-
isProcessingNeeded
public boolean isProcessingNeeded() -
getText
Description copied from interface:ISingleTranslationQueryReturns the text to translate.- Specified by:
getTextin interfaceISingleTranslationQuery- Returns:
- the text to translate. Can't be
null.
-
apply
Description copied from interface:IApplicableApplies a translation value.- Specified by:
applyin interfaceIApplicable- Parameters:
text- an applicable translation value
-
getStorageId
Description copied from interface:IContextTranslationQueryReturns the translation storage id.- Specified by:
getStorageIdin interfaceIContextTranslationQuery- Returns:
- the storage id
-
getProjectName
Description copied from interface:IContextTranslationQueryReturns the name of project for which the translations will be searched.- Specified by:
getProjectNamein interfaceIContextTranslationQuery- Returns:
- the name of project
- See Also:
-
IResource.getName()
-