Package com._1c.g5.v8.dt.bsl.resource
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 Summary
Fields Modifier and Type Field Description static StringCOMMON_MODULEIndex constant corresponding to the built-in language module index element which points that it's common modulestatic StringCONTEXT_DEF_INFORMATIONIndex constant corresponding to the information about built-in language module public methods and variablesstatic StringEXTERNAL_CONN_MODULEIndex constant corresponding to the built-in language module index element which points that it's external connection modulestatic StringGLOBALIndex constant corresponding to the built-in language module index element which points that it's global modulestatic StringMANAGED_APP_MODULEIndex constant corresponding to the built-in language module index element which points that it's managed application modulestatic StringMODULE_NAMEIndex constant corresponding to the information about name of the built-in language modulestatic StringORDINARY_APP_MODULEIndex constant corresponding to the built-in language module index element which points that it's ordinary application modulestatic StringPARAMS_COUNTIndex constant corresponding to the information about number of parameters in global built-in language methodstatic StringSERVER_CALLIndex constant corresponding to the built-in language module index element which points that it's server callable elementstatic StringSOURCE_URIIndex constant corresponding to the information about uri of the source element of indexing element in built-in languagestatic StringTIME_STAMPIndex constant corresponding to the information about local time stamp of built-in module resource
-
Constructor Summary
Constructors Constructor Description BslAdditionalIndexInformationHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCommonModuleDataCheck(Map<String,String> userData, Module module)Adds information about that it's indexing element corresponding to the common modulestatic voidaddEnvironments(Map<String,String> userData, Environmental envtl)Adds information about environments of indexing elementprotected voidaddGlobalDataCheck(Map<String,String> userData, Module module)Adds information about that it's indexing element corresponding to the global moduleprotected voidaddModuleContextDefInformation(Map<String,String> userData, Module module)Adds information about built-in language module public methods and variablesprotected voidaddModuleName(Map<String,String> userData, String moduleName)Adds information about module nameprotected voidaddModuleTimestamp(com.google.common.collect.ImmutableMap.Builder<String,String> userData, Module module)Adds information about time stamp of the resource corresponding to the indexing elementprotected voidaddModuleType(Map<String,String> userData, ModuleType moduleType)Adds information about module typeprotected voidaddParametersMethodCount(Map<String,String> userData, int value)Adds information about number of parameters in indexing elementsprotected voidaddServerCall(Map<String,String> userData, boolean serverCall)Adds information about possibility of server callprotected voidaddSourceModuleUri(Map<String,String> userData, String sourceUri)Adds information about element sourceUriprotected voidaddSourceUriOfExportedMethods(Map<String,String> userData, Module module)Adds information about source uri of module exports elementsMap<String,String>createAdditionalModuleIndexInformation(Module module)Create additional index information for built-in language moduleMap<String,String>createAdditionalModuleItemIndexInformation(Environmental item, String moduleName, ModuleType moduleType, boolean serverCall, String sourceUri, int paramsCount)Create additional index information for built-in language module elementList<String>getContextDefMethodNames(org.eclipse.xtext.resource.IEObjectDescription description)Gets index element information about built-in language module public methods and variablesIntegergetModuleItemParametersCount(org.eclipse.xtext.resource.IEObjectDescription description)Gets index element information about number of parameters in global built-in language methodLonggetTimestamp(org.eclipse.xtext.resource.IEObjectDescription description)Gets index element information about local time stamp of built-in module resourcebooleanhasContextDefInformation(org.eclipse.xtext.resource.IEObjectDescription description)Checks that index element has information about built-in language module public methods and variablesbooleanisAppModuleType(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
-
-
-
Field Detail
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
MODULE_NAME
public static final String MODULE_NAME
Index constant corresponding to the information about name of the built-in language module- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
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:
- Constant Field Values
-
-
Method Detail
-
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 benullenvtl- indexing element, can't benull
-
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 benull- 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 benullmoduleName- information about built-in language module name, can't benullmoduleType- information about built-in language module type, can't benullserverCall-trueif need to add information that it's sever callable elementsourceUri- information about uri of the source element corresponding to the index element, can't benullparamsCount- 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 benull- Returns:
trueif element has information about built-in language module public methods and variables,falseotherwise
-
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 benull- Returns:
- index element information about built-in language module public methods and variables, can be
nullif 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 benull- Returns:
- index element information about local time stamp of built-in module resource, can be
nullif 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 benull- Returns:
- index element information about number of parameters in global built-in language method, can be
nullif 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 benull- Returns:
trueif index element corresponding to the one type of the built-in language module: managed, ordinary application module or external connection module,falseotherwise
-
addModuleType
protected void addModuleType(Map<String,String> userData, ModuleType moduleType)
Adds information about module type- Parameters:
userData- current additional index information, can't benullmoduleType- actual value of module type, can't benull
-
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 benullserverCall-trueif sever call is allowed,falseotherwise
-
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 benullmodule- actual built-in language module, can't benull
-
addModuleName
protected void addModuleName(Map<String,String> userData, String moduleName)
Adds information about module name- Parameters:
userData- current additional index information, can't benullmoduleName- actual value of module name, can't benull
-
addSourceModuleUri
protected void addSourceModuleUri(Map<String,String> userData, String sourceUri)
Adds information about element sourceUri- Parameters:
userData- current additional index information, can't benullsourceUri- actual value of source uri of indexing element, can't benull
-
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 benullvalue- 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 benullmodule- actual built-in language module, can't benull
-
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 benullmodule- actual built-in language module, can't benull
-
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 benullmodule- actual built-in language module, can't benull
-
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 benullmodule- actual built-in language module, can't benull
-
-