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 String
COMMON_MODULE
Index constant corresponding to the built-in language module index element which points that it's common modulestatic String
CONTEXT_DEF_INFORMATION
Index constant corresponding to the information about built-in language module public methods and variablesstatic String
EXTERNAL_CONN_MODULE
Index constant corresponding to the built-in language module index element which points that it's external connection modulestatic String
GLOBAL
Index constant corresponding to the built-in language module index element which points that it's global modulestatic String
MANAGED_APP_MODULE
Index constant corresponding to the built-in language module index element which points that it's managed application modulestatic String
MODULE_NAME
Index constant corresponding to the information about name of the built-in language modulestatic String
ORDINARY_APP_MODULE
Index constant corresponding to the built-in language module index element which points that it's ordinary application modulestatic String
PARAMS_COUNT
Index constant corresponding to the information about number of parameters in global built-in language methodstatic String
SERVER_CALL
Index constant corresponding to the built-in language module index element which points that it's server callable elementstatic String
SOURCE_URI
Index constant corresponding to the information about uri of the source element of indexing element in built-in languagestatic String
TIME_STAMP
Index 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 void
addCommonModuleDataCheck(Map<String,String> userData, Module module)
Adds information about that it's indexing element corresponding to the common modulestatic void
addEnvironments(Map<String,String> userData, Environmental envtl)
Adds information about environments of indexing elementprotected void
addGlobalDataCheck(Map<String,String> userData, Module module)
Adds information about that it's indexing element corresponding to the global moduleprotected void
addModuleContextDefInformation(Map<String,String> userData, Module module)
Adds information about built-in language module public methods and variablesprotected void
addModuleName(Map<String,String> userData, String moduleName)
Adds information about module nameprotected 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 elementprotected void
addModuleType(Map<String,String> userData, ModuleType moduleType)
Adds information about module typeprotected void
addParametersMethodCount(Map<String,String> userData, int value)
Adds information about number of parameters in indexing elementsprotected void
addServerCall(Map<String,String> userData, boolean serverCall)
Adds information about possibility of server callprotected void
addSourceModuleUri(Map<String,String> userData, String sourceUri)
Adds information about element sourceUriprotected void
addSourceUriOfExportedMethods(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 variablesInteger
getModuleItemParametersCount(org.eclipse.xtext.resource.IEObjectDescription description)
Gets index element information about number of parameters in global built-in language methodLong
getTimestamp(org.eclipse.xtext.resource.IEObjectDescription description)
Gets index element information about local time stamp of built-in module resourceboolean
hasContextDefInformation(org.eclipse.xtext.resource.IEObjectDescription description)
Checks that index element has information about built-in language module public methods and variablesboolean
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
-
-
-
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 benull
envtl
- 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 benull
moduleName
- information about built-in language module name, can't benull
moduleType
- information about built-in language module type, can't benull
serverCall
-true
if need to add information that it's sever callable elementsourceUri
- information about uri of the source element corresponding to the index element, can't benull
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 benull
- 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 benull
- 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 benull
- 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 benull
- 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 benull
- 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 benull
moduleType
- 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 benull
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 benull
module
- 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 benull
moduleName
- 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 benull
sourceUri
- 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 benull
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 benull
module
- 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 benull
module
- 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 benull
module
- 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 benull
module
- actual built-in language module, can't benull
-
-