Package com.e1c.langtool.v8.dt.bsl
Class ModuleCachedLoader
java.lang.Object
com.e1c.langtool.v8.dt.bsl.ModuleCachedLoader
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanCached(org.eclipse.emf.common.util.URI uri) Clean cached modules.@Nullable ModulegetModule(@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 ModulegetModule(@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.
-
Constructor Details
-
ModuleCachedLoader
-
-
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 benull.cancelIndicator- the cancel indicator, cannot benull.- Returns:
- the module fully resolved or
nullif 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 modulecontext- the context object to resolve module if it gets as proxy, should not benullcancelIndicator- the cancel indicator, cannot benull.- Returns:
- the module fully resolved or
nullif not found.
-
cleanCached
public void cleanCached(org.eclipse.emf.common.util.URI uri) Clean cached modules.- Parameters:
uri- the URI of module
-