Class DefaultModuleExtensionService

java.lang.Object
com._1c.g5.v8.dt.bsl.common.DefaultModuleExtensionService
All Implemented Interfaces:
IModuleExtensionService

public class DefaultModuleExtensionService extends Object implements IModuleExtensionService
Default implementation of IModuleExtensionService. Instance of this class will be used by Bsl language mechanism if supporting of extension project is switched off
  • Constructor Details

    • DefaultModuleExtensionService

      public DefaultModuleExtensionService()
  • Method Details

    • getSourceMethod

      public Map<Pragma,Method> getSourceMethod(Method extentionMethod)
      Description copied from interface: IModuleExtensionService
      Gets adoptable method by extension method
      Specified by:
      getSourceMethod in interface IModuleExtensionService
      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

      public boolean isExtensionModule(Module module)
      Description copied from interface: IModuleExtensionService
      Checks that this Module corresponding to the extension of configuration
      Specified by:
      isExtensionModule in interface IModuleExtensionService
      Parameters:
      module - checking Module, can't be null
      Returns:
      true if this Module corresponding to the extension of configuration, false otherwise
    • getSourceModule

      public Module getSourceModule(Module module)
      Description copied from interface: IModuleExtensionService
      Gets adoptable Module by extension Bsl module
      Specified by:
      getSourceModule in interface IModuleExtensionService
      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

      public Map<CaseInsensitiveString,Collection<Pragma>> getSourceMethodNames(Method extentionMethod)
      Description copied from interface: IModuleExtensionService
      Gets adoptable method names by extension method
      Specified by:
      getSourceMethodNames in interface IModuleExtensionService
      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

      public String getExtensionPrefix(Module module)
      Description copied from interface: IModuleExtensionService
      Gets prefix of extension project by extension Bsl module
      Specified by:
      getExtensionPrefix in interface IModuleExtensionService
      Parameters:
      module - extension Bsl module, can't be null
      Returns:
      prefix of extension project by extension Bsl module, never null
    • getSourceObject

      public org.eclipse.emf.ecore.EObject getSourceObject(org.eclipse.emf.ecore.EObject object)
      Description copied from interface: IModuleExtensionService
      Gets adoptable EObject by extension EObject. See method IModelObjectAdopter#getSourceModule(EObject)
      Specified by:
      getSourceObject in interface IModuleExtensionService
      Parameters:
      object - extension EObject, can't be null
      Returns:
      adoptable EObject, can be null if adoptable object wasn't found
    • getExtensionMethods

      public Map<Pragma,Method> getExtensionMethods(Module extensionModule, String methodName)
      Description copied from interface: IModuleExtensionService
      Gets extension method overriding adoptable method with name methodName
      Specified by:
      getExtensionMethods in interface IModuleExtensionService
      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

      public Method getSourceMethodForFormEventHandler(Module extensionModule, String methodName, BslEventsService eventService)
      Description copied from interface: IModuleExtensionService
      Gets adoptable method by event handler method name from extension form module
      Specified by:
      getSourceMethodForFormEventHandler in interface IModuleExtensionService
      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

      public boolean isCorrectVersionForAnnotationPragma(Module module)
      Description copied from interface: IModuleExtensionService
      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
      Specified by:
      isCorrectVersionForAnnotationPragma in interface IModuleExtensionService
      Parameters:
      module - checking Module, can't be null
      Returns:
      true if annotation available for methods of this module, false otherwise
    • isAnnotationPragmaAllowed

      public boolean isAnnotationPragmaAllowed(IV8Project project)
      Description copied from interface: IModuleExtensionService
      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
      Specified by:
      isAnnotationPragmaAllowed in interface IModuleExtensionService
      Parameters:
      project - checking IV8Project, can't be null
      Returns:
      true if annotation available for methods of this module, false otherwise
    • getExtensionModules

      public Collection<Module> getExtensionModules(Module sourceModule)
      Description copied from interface: IModuleExtensionService
      Gets all extension Module by source
      Specified by:
      getExtensionModules in interface IModuleExtensionService
      Parameters:
      sourceModule - source Module, can't be null
      Returns:
      collection of extension Module, never null
    • getSourceMethodsForFormEventHandler

      public Map<Method,org.eclipse.xtext.util.Pair<Method,String>> getSourceMethodsForFormEventHandler(Module adoptableModule, Module extensionModule, BslEventsService eventService)
      Description copied from interface: IModuleExtensionService
      Gets correspondence between methods from source module (this method is event handler for form item event) and their extension methods from extension module
      Specified by:
      getSourceMethodsForFormEventHandler in interface IModuleExtensionService
      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