Class ModelTranslator.Result

  • All Implemented Interfaces:
    IDeferredModelLoader<Project>
    Enclosing class:
    ModelTranslator

    public static class ModelTranslator.Result
    extends java.lang.Object
    implements IDeferredModelLoader<Project>
    Implements a translation result enabling deferred model loading. As long as #completeLoading() is not called, the model instances stored in this instance are not ready for use.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • Result

        private Result​(ModelTranslator translator,
                       java.net.URI uri)
        Creates a result instance representing the parse result for multiple projects and enables deferred loading.
        Parameters:
        translator - the model translator instance
        uri - the model URI to be used as ID
    • Method Detail

      • add

        private void add​(ResultEntry entry)
        Adds a partially completed xText project and an IVML project in terms of an entry.
        Parameters:
        entry - the entry to be added
      • createTranslationResult

        public TranslationResult<Project> createTranslationResult()
        Creates the translation result.
        Returns:
        the translation result
      • getTranslator

        ModelTranslator getTranslator()
        Returns the translator instance.
        Returns:
        the translator instance
      • getModelId

        public java.lang.String getModelId()
        Description copied from interface: IDeferredModelLoader
        Returns an ID of the model, e.g., its URI or its name. Used to identify this loader among multiple trials of loading the same model.
        Specified by:
        getModelId in interface IDeferredModelLoader<Project>
        Returns:
        the ID