Class BslAdditionalIndexInformationHelper

java.lang.Object
com._1c.g5.v8.dt.bsl.resource.BslAdditionalIndexInformationHelper

public class BslAdditionalIndexInformationHelper extends Object
Special service for working with additional index data for built-in language semantic module indexing elements.
Clients can add their special information to the index or change current index information by overriding methods of this class.
This class provides special constants for getting index information. Example:
   public void foo(IEObjectDescription description)
   {
      ...
      //gets information by contants: FOO_CONTANT
      String infromation = description.getUserData(FOO_CONTANT);
      //processing information
      ...
   }
 
  • Field Details

    • CONTEXT_DEF_INFORMATION

      public static final String CONTEXT_DEF_INFORMATION
      Index constant corresponding to the information about built-in language module public methods and variables
      See Also:
    • TIME_STAMP

      public static final String TIME_STAMP
      Index constant corresponding to the information about local time stamp of built-in module resource
      See Also:
    • COMMON_MODULE

      public static final String COMMON_MODULE
      Index constant corresponding to the built-in language module index element which points that it's common module
      See Also:
    • GLOBAL

      public static final String GLOBAL
      Index constant corresponding to the built-in language module index element which points that it's global module
      See Also:
    • PARAMS_COUNT

      public static final String PARAMS_COUNT
      Index constant corresponding to the information about number of parameters in global built-in language method
      See Also:
    • MODULE_NAME

      public static final String MODULE_NAME
      Index constant corresponding to the information about name of the built-in language module
      See Also:
    • SOURCE_URI

      public static final String SOURCE_URI
      Index constant corresponding to the information about uri of the source element of indexing element in built-in language
      See Also:
    • SERVER_CALL

      public static final String SERVER_CALL
      Index constant corresponding to the built-in language module index element which points that it's server callable element
      See Also:
    • EXTERNAL_CONN_MODULE

      public static final String EXTERNAL_CONN_MODULE
      Index constant corresponding to the built-in language module index element which points that it's external connection module
      See Also:
    • MANAGED_APP_MODULE

      public static final String MANAGED_APP_MODULE
      Index constant corresponding to the built-in language module index element which points that it's managed application module
      See Also:
    • ORDINARY_APP_MODULE

      public static final String ORDINARY_APP_MODULE
      Index constant corresponding to the built-in language module index element which points that it's ordinary application module
      See Also:
  • Constructor Details

    • BslAdditionalIndexInformationHelper

      public BslAdditionalIndexInformationHelper()
  • Method Details

    • addEnvironments

      public static void addEnvironments(Map<String,String> userData, Environmental envtl)
      Adds information about environments of indexing element
      Parameters:
      userData - current additional index information, can't be null
      envtl - indexing element, can't be null
    • createAdditionalModuleIndexInformation

      public Map<String,String> createAdditionalModuleIndexInformation(Module module)
      Create additional index information for built-in language module
      Parameters:
      module - actual built-in language module, can't be null
      Returns:
      additional index information, never null
    • createAdditionalModuleItemIndexInformation

      public Map<String,String> createAdditionalModuleItemIndexInformation(Environmental item, String moduleName, ModuleType moduleType, boolean serverCall, String sourceUri, int paramsCount)
      Create additional index information for built-in language module element
      Parameters:
      item - built-in language module element, can't be null
      moduleName - information about built-in language module name, can't be null
      moduleType - information about built-in language module type, can't be null
      serverCall - true if need to add information that it's sever callable element
      sourceUri - information about uri of the source element corresponding to the index element, can't be null
      paramsCount - information about number of parameters in global built-in language method
      Returns:
      additional index information, never null
    • hasContextDefInformation

      public boolean hasContextDefInformation(org.eclipse.xtext.resource.IEObjectDescription description)
      Checks that index element has information about built-in language module public methods and variables
      Parameters:
      description - checking index element, can't be null
      Returns:
      true if element has information about built-in language module public methods and variables, false otherwise
    • getContextDefMethodNames

      public List<String> getContextDefMethodNames(org.eclipse.xtext.resource.IEObjectDescription description)
      Gets index element information about built-in language module public methods and variables
      Parameters:
      description - index element, can't be null
      Returns:
      index element information about built-in language module public methods and variables, can be null if element doesn't have such information
    • getTimestamp

      public Long getTimestamp(org.eclipse.xtext.resource.IEObjectDescription description)
      Gets index element information about local time stamp of built-in module resource
      Parameters:
      description - index element, can't be null
      Returns:
      index element information about local time stamp of built-in module resource, can be null if element doesn't have such information
    • getModuleItemParametersCount

      public Integer getModuleItemParametersCount(org.eclipse.xtext.resource.IEObjectDescription description)
      Gets index element information about number of parameters in global built-in language method
      Parameters:
      description - index element, can't be null
      Returns:
      index element information about number of parameters in global built-in language method, can be null if element doesn't have such information
    • isAppModuleType

      public boolean isAppModuleType(org.eclipse.xtext.resource.IEObjectDescription description)
      Checks that index element corresponding to the one type of the built-in language module: managed, ordinary application module or external connection module
      Parameters:
      description - checking index element, can't be null
      Returns:
      true if index element corresponding to the one type of the built-in language module: managed, ordinary application module or external connection module, false otherwise
    • addModuleType

      protected void addModuleType(Map<String,String> userData, ModuleType moduleType)
      Adds information about module type
      Parameters:
      userData - current additional index information, can't be null
      moduleType - actual value of module type, can't be null
    • addServerCall

      protected void addServerCall(Map<String,String> userData, boolean serverCall)
      Adds information about possibility of server call
      Parameters:
      userData - current additional index information, can't be null
      serverCall - true if sever call is allowed, false otherwise
    • addSourceUriOfExportedMethods

      protected void addSourceUriOfExportedMethods(Map<String,String> userData, Module module)
      Adds information about source uri of module exports elements
      Parameters:
      userData - current additional index information, can't be null
      module - actual built-in language module, can't be null
    • addModuleName

      protected void addModuleName(Map<String,String> userData, String moduleName)
      Adds information about module name
      Parameters:
      userData - current additional index information, can't be null
      moduleName - actual value of module name, can't be null
    • addSourceModuleUri

      protected void addSourceModuleUri(Map<String,String> userData, String sourceUri)
      Adds information about element sourceUri
      Parameters:
      userData - current additional index information, can't be null
      sourceUri - actual value of source uri of indexing element, can't be null
    • addParametersMethodCount

      protected void addParametersMethodCount(Map<String,String> userData, int value)
      Adds information about number of parameters in indexing elements
      Parameters:
      userData - current additional index information, can't be null
      value - number of parameters
    • addGlobalDataCheck

      protected void addGlobalDataCheck(Map<String,String> userData, Module module)
      Adds information about that it's indexing element corresponding to the global module
      Parameters:
      userData - current additional index information, can't be null
      module - actual built-in language module, can't be null
    • addCommonModuleDataCheck

      protected void addCommonModuleDataCheck(Map<String,String> userData, Module module)
      Adds information about that it's indexing element corresponding to the common module
      Parameters:
      userData - current additional index information, can't be null
      module - actual built-in language module, can't be null
    • addModuleTimestamp

      protected void addModuleTimestamp(com.google.common.collect.ImmutableMap.Builder<String,String> userData, Module module)
      Adds information about time stamp of the resource corresponding to the indexing element
      Parameters:
      userData - current additional index information, can't be null
      module - actual built-in language module, can't be null
    • addModuleContextDefInformation

      protected void addModuleContextDefInformation(Map<String,String> userData, Module module)
      Adds information about built-in language module public methods and variables
      Parameters:
      userData - current additional index information, can't be null
      module - actual built-in language module, can't be null