Package com._1c.g5.v8.dt.bsl.resource
Class ExportMethodProvider
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.resource.ExportMethodProvider
-
public final class ExportMethodProvider extends Object
Special provider for caching bsl exporting methods. Important that provider does not return clear exporting methods, it returns specialMethod
without resource and container, which contains right name of the export method, right properties: isRetval, isDeprecated, isServerCall, source uri to the real method in module, min parameters count and information about each parameter - out or not
-
-
Constructor Summary
Constructors Constructor Description ExportMethodProvider(Path path, Path oldPath, IResourceLookup resourceLookup)
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activate()
Activates the provider.void
close(org.eclipse.core.resources.IProject project, boolean clean)
Closes the store for the specified project.Collection<Method>
getMockMethods(String contextDefUri, String methodName, org.eclipse.emf.ecore.EObject context)
Gets mock of real exported methods by name for concrete moduleCollection<Property>
getMockProperties(String contextDefUri, String propertyName, org.eclipse.emf.ecore.EObject context)
Gets mock of real exported properties by name for concrete moduleboolean
hasExportMethod(String contextDefUri)
Checks that there is information about exported methods for concrete moduleboolean
hasExportProperty(String contextDefUri)
Checks that there is information about exported properties for concrete modulevoid
open(org.eclipse.core.resources.IProject project, boolean clean)
Opens the store for the specified project.void
updateExportMethods(BslContextDef contextDef)
Updates information about exported methods
-
-
-
Constructor Detail
-
ExportMethodProvider
@Inject public ExportMethodProvider(Path path, Path oldPath, IResourceLookup resourceLookup)
Constructs a new instance.- Parameters:
path
- The provider directory path. May not benull
.oldPath
- The old provider directory path. May not benull
.resourceLookup
- The resource lookup. May not benull
.
-
-
Method Detail
-
activate
public void activate()
Activates the provider.
-
open
public void open(org.eclipse.core.resources.IProject project, boolean clean)
Opens the store for the specified project.- Parameters:
project
- The project. May not benull
.clean
- The flag indicating whether the store must be cleaned.
-
close
public void close(org.eclipse.core.resources.IProject project, boolean clean)
Closes the store for the specified project.- Parameters:
project
- The project. May not benull
.shutdown
- The flag indicating whether the application is being shut down.clean
- The flag indicating whether the store must be cleaned.
-
updateExportMethods
public void updateExportMethods(BslContextDef contextDef)
Updates information about exported methods- Parameters:
contextDef
-BslContextDef
with actual exported methods for one module, cannot benull
-
hasExportMethod
public boolean hasExportMethod(String contextDefUri)
Checks that there is information about exported methods for concrete module- Parameters:
contextDefUri
- string presentation of context defURI
of module, cannot benull
- Returns:
true
if information is available,false
otherwise
-
hasExportProperty
public boolean hasExportProperty(String contextDefUri)
Checks that there is information about exported properties for concrete module- Parameters:
contextDefUri
- string presentation of context defURI
of module, cannot benull
- Returns:
true
if information is available,false
otherwise
-
getMockMethods
public Collection<Method> getMockMethods(String contextDefUri, String methodName, org.eclipse.emf.ecore.EObject context)
Gets mock of real exported methods by name for concrete module- Parameters:
contextDefUri
- string presentation of context defURI
of module, cannot benull
methodName
- name of getting mock exported methods, cannot benull
context
- TODO- Returns:
- collection of mock exported methods. Mock methods is special
Method
without resource and container, which contains right name of the export method, right properties: isRetval, isDeprecated, isServerCall, source uri to the real method in module, min parameters count and information about each parameter - out or not
-
getMockProperties
public Collection<Property> getMockProperties(String contextDefUri, String propertyName, org.eclipse.emf.ecore.EObject context)
Gets mock of real exported properties by name for concrete module- Parameters:
contextDefUri
- string presentation of context defURI
of module, cannot benull
propertyName
- name of getting mock exported properties, cannot benull
- Returns:
- collection of mock exported properties. Mock property is special
Property
without resource and container, which contains right name of the export property, right properties: source uri to the real property in module
-
-