Class ExportMethodTypeProvider


  • public final class ExportMethodTypeProvider
    extends Object
    Special provider for caching bsl exporting method returning types and parameters types
    • Constructor Detail

      • ExportMethodTypeProvider

        @Inject
        public ExportMethodTypeProvider​(Path path,
                                        Path oldPath,
                                        IResourceLookup resourceLookup,
                                        IRuntimeVersionSupport versionSupport,
                                        org.eclipse.xtext.scoping.IScopeProvider scopeProvider,
                                        ValueTableDynamicContextDefProvider valueTableDynamicContextDefProvider,
                                        ValueTreeDynamicContextDefProvider valueTreeDynamicContextDefProvider)
        Constructs a new instance.
        Parameters:
        path - The provider directory path. May not be null.
        oldPath - The old provider path. May not be null.
        resourceLookup - The resource lookup. May not be null.
        versionSupport - The version support. May not be null.
        scopeProvider - The scope provider. May not be null.
        valueTableDynamicContextDefProvider - The value table dynamic context def provider. May not be null.
        valueTreeDynamicContextDefProvider - The value tree dynamic context def provider. May not be null.
    • 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 be null.
        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 be null.
        shutdown - The flag indicating whether the application is being shut down.
        clean - The flag indicating whether the store must be cleaned.
      • saveContextDefMethodType

        public void saveContextDefMethodType​(BslContextDef contextDef)
        Saves information about context def method returning types and about context def method parameters types
        Parameters:
        contextDef - bsl Module contextDef, contains exporting module methods, can't be null
      • hasContextDefMethodTypeInformation

        public boolean hasContextDefMethodTypeInformation​(BslContextDef contextDef)
        Checks that provider contains information about methods returning types from contextDef
        Parameters:
        contextDef - checking bsl Module contextDef, contains exporting module methods, can't be null
        Returns:
        true if provider contains information about methods returning types from contextDef, false otherwise
      • getMethodType

        public List<TypeItem> getMethodType​(Method method)
        Gets returning method types
        Parameters:
        method - exporting method from bsl module, can't be null
        Returns:
        returning method types, never null
      • getMethodParamType

        public List<TypeItem> getMethodParamType​(Method method,
                                                 ParamSet set,
                                                 int index)
        Gets type of exporting bsl method parameter
        Parameters:
        method - exporting method from bsl module, can't be null
        set - actual ParamSet, can't be null
        index - index of parameter in ParamSet
        Returns:
        type of exporting bsl method parameter, never null