Interface TranslationStringsGenerator

All Known Implementing Classes:
ProjectGenerateTranslationStrings, ProjectObjectsGenerateTranslationStrings, TranslatedObjectImportTranslationStrings, TranslatedProjectImportTranslationStrings

public interface TranslationStringsGenerator
Common tool to generate translation strings and store them to some storage. Supports various settings how to collect and fill strings from source project.
See Also:
  • Method Details

    • getTranslatingProject

      ITranslatingProject getTranslatingProject()
      Gets the translating project.
      Returns:
      the translating project, can return null.
    • setTranslatingProject

      void setTranslatingProject(ITranslatingProject translatingProject)
      Sets the translating project.
      Parameters:
      translatingProject - the new translating project
    • checkSettings

      boolean checkSettings()
      Check settings. If checking is unsuccessful get errors getErrors() to show details to user.
      Returns:
      true, checks of settings if successful
    • setFilterParameters

      void setFilterParameters(Map<String,? extends Object> filterParameters)
      Sets the filter parameters.
      Parameters:
      filterParameters - the filter parameters, where key is public filter's parameter name and value, usually string or other object appropriate for the filter participant passed form a caller, cannot be null.
    • addOrUpdateValue

      void addOrUpdateValue(FeatureValue value)
      Adds the or update value.
      Parameters:
      value - the value, cannot be null.
    • collectAndSaveStrings

      void collectAndSaveStrings(org.eclipse.core.runtime.IProgressMonitor monitor)
      Collect and save strings.
      Parameters:
      monitor - the monitor, cannot be null.
    • dispose

      void dispose()
      Dispose and free held resources.
    • saveCollectedStrings

      void saveCollectedStrings(org.eclipse.core.runtime.IProgressMonitor monitor)
      Save collected strings.
      Parameters:
      monitor - the monitor, cannot be null.
    • collectStrings

      boolean collectStrings(org.eclipse.core.runtime.IProgressMonitor monitor)
      Collect translation strings.
      Parameters:
      monitor - the monitor, cannot be null.
      Returns:
      true, if successfully collected and filled with settings
    • getErrors

      Collection<Exception> getErrors()
      Gets the errors that found during collecting features.
      Returns:
      the errors, cannot return null.
    • canProcess

      boolean canProcess()
      checks if can process collecting and saving translation strings..
      Returns:
      true, if can process collecting and saving translation strings.
    • isContinueAfterFirstError

      boolean isContinueAfterFirstError()
      Checks if the collecting process should continue after first error.
      Returns:
      true, if the collecting process should continue after first error
    • setContinueAfterFirstError

      void setContinueAfterFirstError(boolean isContinue)
      Sets whether to continue collect after first error.
      Parameters:
      isContinue - true, to continue after first error
    • getCollectedValues

      Collection<FeatureValue> getCollectedValues()
      Gets the collected values.
      Returns:
      the collected values collecting and saving translation strings, cannot return null.
    • getTranslationProviderId

      String getTranslationProviderId()
      Gets the translation provider id.
      Returns:
      the translation provider id, can return null if not set.
    • setTranslationProviderId

      void setTranslationProviderId(String providerId)
      Sets the translation provider id.
      Parameters:
      providerId - the new translation provider id, cannot be null.
    • setCheckTranslationsInAnyAvailableStorage

      void setCheckTranslationsInAnyAvailableStorage(boolean checkTranslationsInAnyAvailableStorage)
      Sets the check translations in any available storage.
      Parameters:
      checkTranslationsInAnyAvailableStorage - the new check translations in any available storage
    • isCheckTranslationsInAnyAvailableStorage

      boolean isCheckTranslationsInAnyAvailableStorage()
      Checks if the translations need to check exists in any available storage.
      Returns:
      true, if it need to check translations in any available storage
    • setFillUpType

      void setFillUpType(FillUpType fillUpType)
      Sets the fill up type.
      Parameters:
      fillUpType - the new fill up type, cannot be null.
    • getFillUpType

      FillUpType getFillUpType()
      Gets the fill up type. Default is FillUpType.NOT_FILLUP not fill up.
      Returns:
      the fillUpType, cannot return null.
    • setStorageId

      void setStorageId(StorageID storageId)
      Sets the storage id.
      Parameters:
      storageId - the new storage id, cannot be null.
    • getStorageId

      StorageID getStorageId()
      Gets the storage id.
      Returns:
      the storage id, cannot return null.
    • setCollectModelType

      void setCollectModelType(ICollectingParameters.CollectModelType collectModelType)
      Sets to collect computed strings.
      Parameters:
      collectComputedStrings - the new collect computed strings
    • getCollectModelType

      Checks if should to collect computed strings.
      Returns:
      true, if should collect computed strings
    • setCollectInterfaceStrings

      void setCollectInterfaceStrings(boolean collectInterfaceStrings)
      Sets to collect interface strings.
      Parameters:
      collectInterfaceStrings - the new collect interface strings
    • isCollectInterfaceStrings

      boolean isCollectInterfaceStrings()
      Checks if should to collect interface strings.
      Returns:
      true, if should collect interface strings
    • setCollectModelStrings

      void setCollectModelStrings(boolean collectModelStrings)
      Sets to collect model strings.
      Parameters:
      collectModelStrings - the new collect model strings
    • isCollectModelStrings

      boolean isCollectModelStrings()
      Checks if should to collect model strings.
      Returns:
      true, if should collect model strings
    • getProject

      org.eclipse.core.resources.IProject getProject()
      Gets the project of collection.
      Returns:
      the project, cannot be null.
    • removeLanguage

      void removeLanguage(TranslateLanguage language)
      Removes the language from collecting languages.
      Parameters:
      language - the language, cannot be null.
    • addLanguage

      void addLanguage(TranslateLanguage language)
      Adds the language to collect and to save.
      Parameters:
      language - the language, cannot be null.
    • setLanguages

      void setLanguages(List<TranslateLanguage> languages)
      Sets the languages to collect and to save.
      Parameters:
      languages - the new languages, cannot be null.
    • getLanguages

      List<TranslateLanguage> getLanguages()
      Return the languages that should be collected and saved.
      Returns:
      the languages, cannot return null.
    • disableCache

      void disableCache()
    • enableCache

      void enableCache()