Interface IModuleExtensionService

    • Method Detail

      • getSourceMethod

        Map<Pragma,​Method> getSourceMethod​(Method extentionMethod)
        Gets adoptable method by extension method
        Parameters:
        extentionMethod - extension Method from extension Method, can't be null
        Returns:
        correspondence between adoptable method and Pragma expression from extension method, never null
      • isExtensionModule

        boolean isExtensionModule​(Module module)
        Checks that this Module corresponding to the extension of configuration
        Parameters:
        module - checking Module, can't be null
        Returns:
        true if this Module corresponding to the extension of configuration, false otherwise
      • getSourceModule

        Module getSourceModule​(Module module)
        Gets adoptable Module by extension Bsl module
        Parameters:
        module - extension Bsl Module, can't be null
        Returns:
        adoptable Module by extension Bsl module, can be null if there is no adoptable module
      • getSourceMethodNames

        Map<CaseInsensitiveString,​Collection<Pragma>> getSourceMethodNames​(Method extentionMethod)
        Gets adoptable method names by extension method
        Parameters:
        extentionMethod - extension Method from extension Method, can't be null
        Returns:
        correspondence between adoptable method name and collection of Pragmas expression from extension method, never null
      • getExtensionPrefix

        String getExtensionPrefix​(Module module)
        Gets prefix of extension project by extension Bsl module
        Parameters:
        module - extension Bsl module, can't be null
        Returns:
        prefix of extension project by extension Bsl module, never null
      • getSourceObject

        org.eclipse.emf.ecore.EObject getSourceObject​(org.eclipse.emf.ecore.EObject object)
        Gets adoptable EObject by extension EObject. See method IModelObjectAdopter#getSourceModule(EObject)
        Parameters:
        object - extension EObject, can't be null
        Returns:
        adoptable EObject, can be null if adoptable object wasn't found
      • getExtensionMethods

        Map<Pragma,​Method> getExtensionMethods​(Module extensionModule,
                                                     String methodName)
        Gets extension method overriding adoptable method with name methodName
        Parameters:
        extensionModule - extension module, can't be null
        methodName - name of the adoptable method, can't be null
        Returns:
        extension methods by Pragma literalc correspondence to the adoptable method with name methodName, never null
      • getSourceMethodForFormEventHandler

        Method getSourceMethodForFormEventHandler​(Module extensionModule,
                                                  String methodName,
                                                  BslEventsService eventService)
        Gets adoptable method by event handler method name from extension form module
        Parameters:
        extensionModule - form module extension, can't be null
        methodName - name of the event handler extension, can't be null
        eventService - actual BslEventsService, can't be null
        Returns:
        adoptable method by event handler method name from extension form module, can be null if adoptable method wasn't found
      • isCorrectVersionForAnnotationPragma

        boolean isCorrectVersionForAnnotationPragma​(Module module)
        Checks that annotation available for methods of this module. Annotation is unsupported for project version is less than 8.3.9 or for configuration with compatibility mode less than 8.3.9
        Parameters:
        module - checking Module, can't be null
        Returns:
        true if annotation available for methods of this module, false otherwise
      • isAnnotationPragmaAllowed

        boolean isAnnotationPragmaAllowed​(IV8Project project)
        Checks that annotation available for methods of this module. Annotation is unsupported for project version is less than 8.3.9 or for configuration with compatibility mode less than 8.3.9
        Parameters:
        project - checking IV8Project, can't be null
        Returns:
        true if annotation available for methods of this module, false otherwise
      • getExtensionModules

        Collection<Module> getExtensionModules​(Module sourceModule)
        Gets all extension Module by source
        Parameters:
        sourceModule - source Module, can't be null
        Returns:
        collection of extension Module, never null
      • getSourceMethodsForFormEventHandler

        Map<Method,​org.eclipse.xtext.util.Pair<Method,​String>> getSourceMethodsForFormEventHandler​(Module adoptableModule,
                                                                                                               Module extensionModule,
                                                                                                               BslEventsService eventService)
        Gets correspondence between methods from source module (this method is event handler for form item event) and their extension methods from extension module
        Parameters:
        adoptableModule - source Module, can't be null
        extensionModule - extension Module, can't be null
        eventService - actual BslEventsService, can't be null
        Returns:
        map with key Method from source module and value is extension Method of source Method and its string presentation of call type annotation, never null