Interface IFeatureValueCollectingService

All Known Implementing Classes:
FeatureValueCollectingService

public interface IFeatureValueCollectingService
The Interface of the service collecting FeatureValue with registred FeatureValueCollector factories.
See Also:
  • Method Details

    • hasCollector

      boolean hasCollector(Object source)
      Checks if a collector can be created for the given source object.
      Parameters:
      source - the source object, if it is a TranslationSource object the check will be for TranslationSource.getSourceObject()
      Returns:
      true, if collector can be created
    • forEachCollected

      void forEachCollected(TranslationSource source, ICollectingParameters parameters, org.eclipse.core.runtime.IProgressMonitor monitor, BiConsumer<Object,FeatureValue> action)
      Collect feature values and raw source object for the given translation source with parameters and process given action BiConsumer for each collected.
      Parameters:
      source - the source, cannot be null.
      parameters - the parameters, cannot be null.
      monitor - the monitor, cannot be null.
      action - the action to do with collected each feature value. The first argument of BiConsumer is the source raw object that provides a FeatureValue and the second argument of the action is the feature value to handle. Warning: the action is responsible to be thread-safe, no guarantee that collecting process and action will be in same thread.
    • collectAllByFile

      void collectAllByFile(org.eclipse.core.resources.IProject project, ICollectingParameters parameters, BiConsumer<org.eclipse.core.resources.IFile,Collection<FeatureValue>> action, ExecutorService executorService, org.eclipse.core.runtime.IProgressMonitor monitor)
      Collect FeatureValue from all files of the project with using or updating resource cache. This method return result to consumer all collected values by file at ones.
      Parameters:
      project - the project to collect, cannot be null.
      parameters - the parameters, cannot be null.
      action - the consumer action to get collection of FeatureValue by the file, cannot be null.
      executorService - the executor service, cannot be null.
      monitor - the monitor, cannot be null.
    • collectFile

      void collectFile(org.eclipse.core.resources.IFile file, ICollectingParameters parameters, BiConsumer<Object,FeatureValue> action, org.eclipse.core.runtime.IProgressMonitor monitor)
      Collect all FeatureValue from file. This action use cache if exist or update it after collecting.
      Parameters:
      file - the file, cannot be null.
      parameters - the parameters, cannot be null.
      action - the action, cannot be null.
      monitor - the monitor, cannot be null.
    • collectAll

      void collectAll(org.eclipse.core.resources.IProject project, ICollectingParameters parameters, BiConsumer<Object,FeatureValue> action, ExecutorService executorService, org.eclipse.core.runtime.IProgressMonitor monitor)
      Collects feature values and raw source object for the given project and process given action BiConsumer for each of all collected values from project.
      Parameters:
      project - the project, cannot be null.
      parameters - the parameters, cannot be null.
      action - the action to do with collected each feature value. The first argument of BiConsumer is the object that provides a FeatureValue and the second argument of the action is the feature value to handle. Warning: the action is responsible to be thread-safe, no guarantee that collecting process and action will be in same thread.
      executorService - the executor service, cannot be null.
      monitor - the monitor, cannot be null.
    • createCollectors

      Creates the collectors for the given source object. This method should be uses in an implementation of FeatureCollectorFactory to create collectors for sub objects.
      Parameters:
      source - the source object which has translatable features, cannot be null.
      parameters - the parameters, cannot be null.
      addAction - the add action, cannot be null.
      Returns:
      the collection the of newly created collectors, cannot return null.
      See Also: