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(IResourceLookup resourceLookup, IBmModelManager bmModelManager, INamingService namingService)
Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close(org.eclipse.core.resources.IProject project)
Closes the store for the specified project.Collection<Method>
getMockMethods(ContextDef moduleContextDef, String methodName, org.eclipse.emf.ecore.EObject context)
Gets mock of real exported methods by name for concrete moduleCollection<Property>
getMockProperties(ContextDef moduleContextDef, String propertyName, org.eclipse.emf.ecore.EObject context)
Gets mock of real exported properties by name for concrete moduleboolean
hasExportMethod(ContextDef moduleContextDef)
Checks that there is information about exported methods for concrete moduleboolean
hasExportProperty(ContextDef contextDef)
Checks that there is information about exported properties for concrete modulevoid
open(org.eclipse.core.resources.IProject project)
Opens the store for the specified project.void
revertExportMethodIndexChanges(String contextDefFqn, IBmModel bmModel)
Updates information about exported methodsvoid
updateExportMethods(BslContextDef contextDef)
Updates information about exported methods
-
-
-
Constructor Detail
-
ExportMethodProvider
@Inject public ExportMethodProvider(IResourceLookup resourceLookup, IBmModelManager bmModelManager, INamingService namingService)
Constructs a new instance.- Parameters:
resourceLookup
- The resource lookup. May not benull
bmModelManager
- TheIBmModelManager
service reference. May not benull
namingService
- TheINamingService
service reference. May not benull
-
-
Method Detail
-
open
public void open(org.eclipse.core.resources.IProject project)
Opens the store for the specified project.- Parameters:
project
- The project. May not benull
.
-
close
public void close(org.eclipse.core.resources.IProject project)
Closes the store for the specified project.- Parameters:
project
- The project. May not benull
.
-
revertExportMethodIndexChanges
public void revertExportMethodIndexChanges(String contextDefFqn, IBmModel bmModel)
Updates information about exported methods- Parameters:
contextDefFqn
- FQN of a target context def. May not benull
bmModel
- A target BM model which contains the target context def. May not benull
-
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(ContextDef moduleContextDef)
Checks that there is information about exported methods for concrete module- Parameters:
moduleContextDef
- Target module context def. May not benull
- Returns:
true
if information is available,false
otherwise
-
hasExportProperty
public boolean hasExportProperty(ContextDef contextDef)
Checks that there is information about exported properties for concrete module- Parameters:
moduleContextDef
- Target module context def. May not benull
- Returns:
true
if information is available,false
otherwise
-
getMockMethods
public Collection<Method> getMockMethods(ContextDef moduleContextDef, String methodName, org.eclipse.emf.ecore.EObject context)
Gets mock of real exported methods by name for concrete module- Parameters:
moduleContextDef
- Target module context def. May not benull
methodName
- name of getting mock exported methods, cannot benull
context
- The context object ot set into the mock. May not benull
- 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(ContextDef moduleContextDef, String propertyName, org.eclipse.emf.ecore.EObject context)
Gets mock of real exported properties by name for concrete module- Parameters:
moduleContextDef
- Target module context def. May not 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
-
-