Class ModuleCachedLoader

java.lang.Object
com.e1c.langtool.v8.dt.bsl.ModuleCachedLoader

public class ModuleCachedLoader extends Object
The loader service to get Module form shared instance in the project. Returned resource of the module will be fully resolved in single thread {@link BslResource.#setSingleThreadMode()}
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cleanCached(org.eclipse.emf.common.util.URI uri)
    Clean cached modules.
    @Nullable Module
    getModule(@NonNull org.eclipse.core.resources.IFile file, @NonNull org.eclipse.xtext.util.CancelIndicator cancelIndicator)
    Gets the module from common project cache and fully resolve it.
    @Nullable Module
    getModule(@NonNull org.eclipse.emf.common.util.URI uri, @NonNull org.eclipse.emf.ecore.EObject context, @NonNull org.eclipse.xtext.util.CancelIndicator cancelIndicator)
    Gets the module from common project cache and fully resolve it.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ModuleCachedLoader

      @Inject public ModuleCachedLoader(IBmModelManager modelManager)
  • Method Details

    • getModule

      public @Nullable Module getModule(@NonNull org.eclipse.core.resources.IFile file, @NonNull org.eclipse.xtext.util.CancelIndicator cancelIndicator)
      Gets the module from common project cache and fully resolve it.
      Parameters:
      file - the file of the BSL module, cannot be null.
      cancelIndicator - the cancel indicator, cannot be null.
      Returns:
      the module fully resolved or null if not found.
    • getModule

      public @Nullable Module getModule(@NonNull org.eclipse.emf.common.util.URI uri, @NonNull org.eclipse.emf.ecore.EObject context, @NonNull org.eclipse.xtext.util.CancelIndicator cancelIndicator)
      Gets the module from common project cache and fully resolve it.
      Parameters:
      uri - the URI of the module
      context - the context object to resolve module if it gets as proxy, should not be null
      cancelIndicator - the cancel indicator, cannot be null.
      Returns:
      the module fully resolved or null if not found.
    • cleanCached

      public void cleanCached(org.eclipse.emf.common.util.URI uri)
      Clean cached modules.
      Parameters:
      uri - the URI of module