Class AbstractStringLiteralProposalProvider
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.ui.contentassist.stringliteral.AbstractStringLiteralProposalProvider
-
- All Implemented Interfaces:
IStringLiteralProposalProvider
,IStringLiteralProposalProviderExtension
,IStringLiteralHyperlinkProvider
,IAvailableStringLiteralProvider
,IAvailableStringLiteralProviderExtension
,IAvailableStringLiteralProviderImportedNamesExtension
- Direct Known Subclasses:
GraphicalSchemeStringLiteralProposalProvider
,StringLiteralProposalProviderSetParameterValue
,StringLiteralProposalProviderValueToFormAttr
public abstract class AbstractStringLiteralProposalProvider extends Object implements IStringLiteralProposalProviderExtension, IAvailableStringLiteralProviderImportedNamesExtension, IStringLiteralHyperlinkProvider
Implementation ofIStringLiteralProposalProvider
Contains default methods for all implementations
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.bsl.ui.contentassist.stringliteral.IStringLiteralProposalProvider
IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
DELIMETER
Delimeter for splitting string literal contentprotected static org.eclipse.emf.ecore.EReference
EXTERNAL_DATA_PROCESSOR_REFERENCE
EReference
for get ExternalDataProcessor from scopeprotected static org.eclipse.emf.ecore.EReference
EXTERNAL_REPORT_REFERENCE
EReference
for get ExternalReport from scopeprotected static String
FORM
Part of full name of the form object
-
Constructor Summary
Constructors Constructor Description AbstractStringLiteralProposalProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
addQuoteToBegin(String content)
Add '"' tocontent
protected boolean
checkForTypeCommonMethod(org.eclipse.emf.ecore.EObject object, String methodName, String methodNameRu, int paramNumber, int expectedParamNumber)
Checks that given object is common method in Bsl language with defined nameprotected boolean
checkForTypeCommonMethod(org.eclipse.emf.ecore.EObject object, List<String> names, int paramNumber, int expectedParamNumber)
Checks that given object is common method in Bsl language with defined nameprotected boolean
checkForTypeMdObjectMethod(org.eclipse.emf.ecore.EObject object, String methodName, String methodNameRu, int paramNumber, int expectedParamNumber)
Checks that given object is md object method in Bsl language with defined nameprotected boolean
checkForTypeMdObjectMethod(org.eclipse.emf.ecore.EObject object, Collection<String> names, int paramNumber, int expectedParamNumber)
Checks that given object is md object method in Bsl language with defined nameprotected boolean
checkForTypeMethod(org.eclipse.emf.ecore.EObject object, Collection<String> names, int paramNumber, int expectedParamNumber)
Checks method typeprotected boolean
checkForTypeMethod(org.eclipse.emf.ecore.EObject object, Collection<String> names, int paramNumber, List<Integer> expectedParamNumbers)
Checks method typeList<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>>
computeProposals(StringLiteral context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService, boolean isRussian)
Computes all proposals forStringLiteral
in Built-in languageabstract List<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>>
computeProposals(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, String content, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService, boolean isRussian)
Computes all proposals forStringLiteral
in Bls languageprotected List<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>>
computeProposalsForMdObject(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider imgProvider)
Computes all proposals forStringLiteral
in Bls language forMdObject
methodsprotected void
createHyperlinks(StringLiteral literal, org.eclipse.emf.common.util.URI uri, String hyperlinkText, int length, com.google.inject.Provider<org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink> hyperlinkProvider, org.eclipse.emf.ecore.resource.URIConverter uriConverter, org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor acceptor)
Creates hyperlinks for object corresponding to theStringLiteral
from Built-In languagevoid
createHyperlinks(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, com.google.inject.Provider<org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink> hyperlinkProvider, org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor acceptor)
Creates hyperlinks forStringLiteral
protected void
createHyperlinksForAllReferences(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, com.google.inject.Provider<org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink> hyperlinkProvider, org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor acceptor)
Creates hyperlinks forStringLiteral
by allIReferenceDescription
fromIAvailableStringLiteralProviderImportedNamesExtension.getReferenceDescriptions(Triple, IScopeProvider)
protected void
createHyperlinksForFormModule(String formName, org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, com.google.inject.Provider<org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink> hyperlinkProvider, org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor acceptor)
Creates hyperlinks for form moduleprotected List<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>>
createProposalsBaseType(org.eclipse.emf.ecore.EObject parentObject, String content, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService, com.google.common.base.Predicate<TypeItem> predicate, boolean isRussian)
Creates proposals for typeprotected org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>
createProposalsBySegments(String[] segment, String[] segmentUser, IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider imgProvider)
Creates proposal by array of segments possible string and segments of string input by userprotected org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>
createProposalsBySegments(List<String> segmentList, String[] segmentUser, IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider imgProvider)
Creates proposal by array of segments possible string and segments of string input by userprotected List<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>>
createProposalsForCommonMdObjects(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, String content, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, org.eclipse.emf.ecore.EReference ref, org.eclipse.emf.ecore.EClass eClass)
Creates proposals for common objects inConfiguration
protected org.eclipse.emf.ecore.EStructuralFeature
getActualFeatureByType(String[] typeNameSegments)
Gets feature of needed objects by type name
This method should be override by children class for getting needed featureprotected org.eclipse.xtext.resource.IEObjectDescription
getActualMdObjectByType(String[] typeNameSegments, org.eclipse.emf.ecore.EObject parentObject, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Gets actualIEObjectDescription
by type nameprotected List<MdObject>
getAllChildMdObjects(org.eclipse.xtext.resource.IEObjectDescription parentMdObject, org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EStructuralFeature feature)
Gets concrete child md object fromparentMdObject
This method should be override by children class for getting needed children objectsprotected Collection<ISliceFilter>
getFilterScope(IIndexSlicePredicateService slicePredicateService, boolean isRussian)
Gets special filter forIScope
, elements in the scope are filtered by languageprotected org.eclipse.emf.ecore.EReference
getReference(String partTypeName)
Gets reference to configuration objects by part of type nameprotected List<org.eclipse.xtext.resource.IReferenceDescription>
getReferenceDescriptionForMdObject(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Computes reference description for mdObject objects by string literalsprotected List<org.eclipse.xtext.resource.IReferenceDescription>
getReferenceDescriptionsCommonMdObjects(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, org.eclipse.emf.ecore.EReference ref, org.eclipse.emf.ecore.EClass eClass)
Computes reference description for common objects by string literalsprotected Iterable<org.eclipse.xtext.resource.IEObjectDescription>
getScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService, boolean isRussian)
Gets and filtered scope.protected TypeItem
getTypeOfPreviousElement(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context)
GetsTypeItem
for previous elements for parentObject (if it'sDynamicFeatureAccess
)boolean
hasHyperlinks(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context)
Checks that hyperlinks enable for current context ofStringLiteral
boolean
isAppropriate(StringLiteral context)
Checks context for availability of validationboolean
isCorrectValue(String content, org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService)
Checks that content of theStringLiteral
correct in this context.protected boolean
isMetaType(org.eclipse.xtext.resource.IEObjectDescription type)
Checks thatIEObjectDescription
corresponding to theType
added by com._1c.g5.v8.dt.bsl.types.extension.IExternalMetaTypesProviderprotected boolean
startWith(org.eclipse.xtext.naming.QualifiedName fullName, String[] userSegments)
Checks that qualified name starts with user segmentsList<String>
validate(StringLiteral context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService)
ValidatesStringLiteral
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.bsl.validation.stringliterals.IAvailableStringLiteralProviderExtension
isAppropriate
-
Methods inherited from interface com._1c.g5.v8.dt.bsl.validation.stringliterals.IAvailableStringLiteralProviderImportedNamesExtension
getExportedName, getReferenceDescriptions
-
-
-
-
Field Detail
-
DELIMETER
protected static final String DELIMETER
Delimeter for splitting string literal content- See Also:
- Constant Field Values
-
FORM
protected static final String FORM
Part of full name of the form object- See Also:
- Constant Field Values
-
EXTERNAL_DATA_PROCESSOR_REFERENCE
protected static final org.eclipse.emf.ecore.EReference EXTERNAL_DATA_PROCESSOR_REFERENCE
EReference
for get ExternalDataProcessor from scope
-
EXTERNAL_REPORT_REFERENCE
protected static final org.eclipse.emf.ecore.EReference EXTERNAL_REPORT_REFERENCE
EReference
for get ExternalReport from scope
-
-
Method Detail
-
computeProposals
public abstract List<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>> computeProposals(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, String content, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService, boolean isRussian)
Description copied from interface:IStringLiteralProposalProviderExtension
Computes all proposals forStringLiteral
in Bls language- Specified by:
computeProposals
in interfaceIStringLiteralProposalProviderExtension
- Parameters:
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
null
content
- content of the string literal, can't benull
scopeProvider
- actualIScopeProvider
, can't benull
slicePredicateService
- actualIIndexSlicePredicateService
, can't benull
isRussian
- flag of actual language- Returns:
- information about proposal
- content of proposal
- name of proposal
IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
for getting image to proposal
null
-
computeProposals
public List<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>> computeProposals(StringLiteral context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService, boolean isRussian)
Description copied from interface:IStringLiteralProposalProvider
Computes all proposals forStringLiteral
in Built-in language- Specified by:
computeProposals
in interfaceIStringLiteralProposalProvider
- Parameters:
context
-StringLiteral
in which content-assist was called, can't benull
scopeProvider
- actualIScopeProvider
for context of usingStringLiteral
, can't benull
slicePredicateService
- actualIIndexSlicePredicateService
, can't benull
isRussian
- flag of actual language. if it istrue
then script variant of actual configuration equalsScriptVariant.RUSSIAN
,false
otherwise- Returns:
- information about proposal
- content of proposal, must be start form " symbol
- name of proposal
IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
for getting image to proposal
null
-
isCorrectValue
public boolean isCorrectValue(String content, org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService)
Description copied from interface:IAvailableStringLiteralProviderExtension
Checks that content of theStringLiteral
correct in this context. Checks onlyStringLiteral
in one line.- Specified by:
isCorrectValue
in interfaceIAvailableStringLiteralProviderExtension
- Parameters:
content
- content of theStringLiteral
without quote, can't benull
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
null
scopeProvider
- actualIScopeProvider
, can't benull
slicePredicateService
- actualIIndexSlicePredicateService
, can't benull
- Returns:
true
if content of theStringLiteral
correct in this context,false
otherwise
-
isAppropriate
public boolean isAppropriate(StringLiteral context)
Description copied from interface:IAvailableStringLiteralProvider
Checks context for availability of validation- Specified by:
isAppropriate
in interfaceIAvailableStringLiteralProvider
- Parameters:
context
- checkingStringLiteral
for availability of validation, can't benull
- Returns:
true
if validation is available for this context,false
otherwise
-
validate
public List<String> validate(StringLiteral context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService)
Description copied from interface:IAvailableStringLiteralProvider
ValidatesStringLiteral
. Checks onlyStringLiteral
in one line.- Specified by:
validate
in interfaceIAvailableStringLiteralProvider
- Parameters:
context
- validatingStringLiteral
, can't benull
scopeProvider
- actualIScopeProvider
for context of usingStringLiteral
, can't benull
slicePredicateService
- actualIIndexSlicePredicateService
for context of usingStringLiteral
, can't benull
- Returns:
- list of validation issue messages. This messages will be wrapped to the validation diagnostics, or empty list if
StringLiteral
content is correct for this context. Nevernull
-
hasHyperlinks
public boolean hasHyperlinks(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context)
Description copied from interface:IStringLiteralHyperlinkProvider
Checks that hyperlinks enable for current context ofStringLiteral
- Specified by:
hasHyperlinks
in interfaceIStringLiteralHyperlinkProvider
- Parameters:
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
- Returns:
true
if hyperlinks enable,false
otherwise
-
createHyperlinks
public void createHyperlinks(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, com.google.inject.Provider<org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink> hyperlinkProvider, org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor acceptor)
Description copied from interface:IStringLiteralHyperlinkProvider
Creates hyperlinks forStringLiteral
- Specified by:
createHyperlinks
in interfaceIStringLiteralHyperlinkProvider
- Parameters:
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
scopeProvider
- actualIScopeProvider
, can't benull
hyperlinkProvider
- special provider forXtextHyperlink
, can't benull
acceptor
- acceptor for collecting of all created hyperlinks, can't benull
-
addQuoteToBegin
protected String addQuoteToBegin(String content)
Add '"' tocontent
- Parameters:
content
-- Returns:
- new content starts with '"'
-
createProposalsBaseType
protected List<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>> createProposalsBaseType(org.eclipse.emf.ecore.EObject parentObject, String content, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService, com.google.common.base.Predicate<TypeItem> predicate, boolean isRussian)
Creates proposals for type- Parameters:
parentObject
- object contains string literal in its parameters, can't benull
content
- content of the string literal, can't benull
scopeProvider
- actualIScopeProvider
, can't benull
slicePredicateService
- actualIIndexSlicePredicateService
, can't benull
predicate
- filter forTypeItem
, can't benull
isRussian
- flag of actual language- Returns:
- information about proposal
- content of proposal
- name of proposal
IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
for getting image to proposal
-
checkForTypeCommonMethod
protected boolean checkForTypeCommonMethod(org.eclipse.emf.ecore.EObject object, String methodName, String methodNameRu, int paramNumber, int expectedParamNumber)
Checks that given object is common method in Bsl language with defined name- Parameters:
object
- checking object, can't benull
methodName
- checked name, can't benull
methodNameRu
- checked name ru, can't benull
paramNumber
- number of string literal parameterexpectedParamNumber
- expected number of string literal parameter- Returns:
true
if object is common method with defined name
-
checkForTypeCommonMethod
protected boolean checkForTypeCommonMethod(org.eclipse.emf.ecore.EObject object, List<String> names, int paramNumber, int expectedParamNumber)
Checks that given object is common method in Bsl language with defined name- Parameters:
object
- checking object, can't benull
names
- all allowed names of method, can't benull
paramNumber
- number of string literal parameterexpectedParamNumber
- expected number of string literal parameter- Returns:
true
if object is common method with defined name
-
checkForTypeMdObjectMethod
protected boolean checkForTypeMdObjectMethod(org.eclipse.emf.ecore.EObject object, Collection<String> names, int paramNumber, int expectedParamNumber)
Checks that given object is md object method in Bsl language with defined name- Parameters:
object
- checking object, can't benull
names
- all allowed names of method, can't benull
paramNumber
- number of string literal parameterexpectedParamNumber
- expected number of string literal parameter- Returns:
true
if object is common method with defined name
-
checkForTypeMdObjectMethod
protected boolean checkForTypeMdObjectMethod(org.eclipse.emf.ecore.EObject object, String methodName, String methodNameRu, int paramNumber, int expectedParamNumber)
Checks that given object is md object method in Bsl language with defined name- Parameters:
object
- checking object, can't benull
methodName
- checked name, can't benull
methodNameRu
- checked name ru, can't benull
paramNumber
- number of string literal parameterexpectedParamNumber
- expected number of string literal parameter- Returns:
true
if object is common method with defined name
-
createProposalsBySegments
protected org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider> createProposalsBySegments(List<String> segmentList, String[] segmentUser, IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider imgProvider)
Creates proposal by array of segments possible string and segments of string input by user- Parameters:
segment
- possible string segments, can't benull
segmentUser
- user input string segments, can't benull
img
- image of proposal, can't benull
- Returns:
- information about proposal
- content of proposal
- name of proposal
IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
for getting image to proposal
-
createProposalsBySegments
protected org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider> createProposalsBySegments(String[] segment, String[] segmentUser, IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider imgProvider)
Creates proposal by array of segments possible string and segments of string input by user- Parameters:
segment
- possible string segments, can't benull
segmentUser
- user input string segments, can't benull
img
- image of proposal, can't benull
- Returns:
- information about proposal
- content of proposal
- name of proposal
IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
for getting image to proposal
-
getAllChildMdObjects
protected List<MdObject> getAllChildMdObjects(org.eclipse.xtext.resource.IEObjectDescription parentMdObject, org.eclipse.emf.ecore.resource.Resource resource, org.eclipse.emf.ecore.EStructuralFeature feature)
Gets concrete child md object fromparentMdObject
This method should be override by children class for getting needed children objects- Parameters:
parentMdObject
- , can't benull
resource
- for resolvingparentObject
, can't benull
feature
- feature of children md objects, can't benull
- Returns:
- list of children objects of
parentMdObject
, nevernull
-
getActualFeatureByType
protected org.eclipse.emf.ecore.EStructuralFeature getActualFeatureByType(String[] typeNameSegments)
Gets feature of needed objects by type name
This method should be override by children class for getting needed feature- Parameters:
typeNameSegments
- type name, can't benull
- Returns:
EStructuralFeature
, can benull
-
getActualMdObjectByType
protected org.eclipse.xtext.resource.IEObjectDescription getActualMdObjectByType(String[] typeNameSegments, org.eclipse.emf.ecore.EObject parentObject, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Gets actualIEObjectDescription
by type name- Parameters:
typeNameSegments
- type name divided by segmentsparentObject
- context forIScopeProvider
scopeProvider
- actualIScopeProvider
, can't benull
- Returns:
- find
IEObjectDescription
by type name, can benull
if md object wasn't found
-
getReference
protected org.eclipse.emf.ecore.EReference getReference(String partTypeName)
Gets reference to configuration objects by part of type name- Parameters:
partTypeName
- part of type name, can't benull
- Returns:
- corresponding
EReference
to Configuration object, can benull
if reference wasn't found
-
getTypeOfPreviousElement
protected TypeItem getTypeOfPreviousElement(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context)
GetsTypeItem
for previous elements for parentObject (if it'sDynamicFeatureAccess
)- Parameters:
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
null
- Returns:
- find
TypeItem
ornull
-
computeProposalsForMdObject
protected List<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>> computeProposalsForMdObject(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider imgProvider)
Computes all proposals forStringLiteral
in Bls language forMdObject
methods- Parameters:
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
null
scopeProvider
- actualIScopeProvider
, can't benull
imgProvider
- implementation ofIStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
, can't benull
- Returns:
- information about proposal
- content of proposal
- name of proposal
IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
for getting image to proposa
null
-
getReferenceDescriptionForMdObject
protected List<org.eclipse.xtext.resource.IReferenceDescription> getReferenceDescriptionForMdObject(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Computes reference description for mdObject objects by string literals- Parameters:
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
null
scopeProvider
- actualIScopeProvider
, can't benull
- Returns:
- list of reference description of empty list, if description wan't found, never
null
-
createProposalsForCommonMdObjects
protected List<org.eclipse.xtext.util.Triple<String,String,IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider>> createProposalsForCommonMdObjects(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, String content, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, org.eclipse.emf.ecore.EReference ref, org.eclipse.emf.ecore.EClass eClass)
Creates proposals for common objects inConfiguration
- Parameters:
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
null
content
- content of the string literal, can't benull
scopeProvider
- actualIScopeProvider
, can't benull
methodNames
- allowed Bsl method' names, can't benull
ref
-EReference
to common objects forIScopeProvider
eClass
-EClass
for gettingImage
, can't benull
- Returns:
- information about proposal
- content of proposal
- name of proposal
IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
for getting image to proposa
null
-
getReferenceDescriptionsCommonMdObjects
protected List<org.eclipse.xtext.resource.IReferenceDescription> getReferenceDescriptionsCommonMdObjects(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, org.eclipse.emf.ecore.EReference ref, org.eclipse.emf.ecore.EClass eClass)
Computes reference description for common objects by string literals- Parameters:
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
null
scopeProvider
- actualIScopeProvider
, can't benull
methodNames
- allowed Bsl method' names, can't benull
ref
-EReference
to common objects forIScopeProvider
, can't benull
eClass
-EClass
for gettingImage
, can't benull
- Returns:
- list of reference description of empty list, if description wan't found, never
null
-
checkForTypeMethod
protected boolean checkForTypeMethod(org.eclipse.emf.ecore.EObject object, Collection<String> names, int paramNumber, int expectedParamNumber)
Checks method type- Parameters:
object
- actual object from Bsl module, can't benull
names
- allowed methods names, can't benull
paramNumber
- actual number of parameter in methodexpectedParamNumber
- expected number of parameter in method- Returns:
true
if is appropriate method type,false
otherwise
-
checkForTypeMethod
protected boolean checkForTypeMethod(org.eclipse.emf.ecore.EObject object, Collection<String> names, int paramNumber, List<Integer> expectedParamNumbers)
Checks method type- Parameters:
object
- actual object from Bsl module, can't benull
names
- allowed methods names, can't benull
paramNumber
- actual number of parameter in methodexpectedParamNumbers
- set of expected numbers of parameter in method, can't benull
- Returns:
true
if is appropriate method type,false
otherwise
-
getScope
protected Iterable<org.eclipse.xtext.resource.IEObjectDescription> getScope(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, IIndexSlicePredicateService slicePredicateService, boolean isRussian)
Gets and filtered scope.- Parameters:
context
- actual contextcontext
- the element from which an element shall be referenced. It doesn't need to be the element containing the reference, it is just used to find the most inner scope for givenEReference
.reference
- the reference for which to get the scope, can't benull
isRussian
- current language,true
if Russian,false
otherwise- Returns:
- elements from filtered scope after, never
null
-
getFilterScope
protected Collection<ISliceFilter> getFilterScope(IIndexSlicePredicateService slicePredicateService, boolean isRussian)
Gets special filter forIScope
, elements in the scope are filtered by language- Parameters:
isRussian
- current language,true
if Russian,false
otherwise- Returns:
- created filter, never
null
-
createHyperlinksForAllReferences
protected void createHyperlinksForAllReferences(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, com.google.inject.Provider<org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink> hyperlinkProvider, org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor acceptor)
Creates hyperlinks forStringLiteral
by allIReferenceDescription
fromIAvailableStringLiteralProviderImportedNamesExtension.getReferenceDescriptions(Triple, IScopeProvider)
- Parameters:
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
null
scopeProvider
- actualIScopeProvider
, can't benull
hyperlinkProvider
- special provider forXtextHyperlink
, can't benull
acceptor
- acceptor for collecting of all created hyperlinks, can't benull
-
createHyperlinksForFormModule
protected void createHyperlinksForFormModule(String formName, org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider, com.google.inject.Provider<org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink> hyperlinkProvider, org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor acceptor)
Creates hyperlinks for form module- Parameters:
formName
- name of the processing form, can't benull
context
- contains- parentObject object contains string literal in its parameters
- allExpr all parameters of
parentObject
- paramNumber number of string literal in parameter method's list
null
scopeProvider
- actualIScopeProvider
, can't benull
hyperlinkProvider
- special provider forXtextHyperlink
, can't benull
acceptor
- acceptor for collecting of all created hyperlinks, can't benull
-
createHyperlinks
protected void createHyperlinks(StringLiteral literal, org.eclipse.emf.common.util.URI uri, String hyperlinkText, int length, com.google.inject.Provider<org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink> hyperlinkProvider, org.eclipse.emf.ecore.resource.URIConverter uriConverter, org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor acceptor)
Creates hyperlinks for object corresponding to theStringLiteral
from Built-In language- Parameters:
literal
-StringLiteral
from Built-In language, can't benull
uri
- actual uri for creating hyperlinks, can't benull
hyperlinkText
- text of hyperlinks, can't benull
length
- actual length of hyperlinkshyperlinkProvider
- special provider forXtextHyperlink
, can't benull
uriConverter
- actualURIConverter
, can't benull
acceptor
- acceptor for collecting of all created hyperlinks, can't benull
-
startWith
protected boolean startWith(org.eclipse.xtext.naming.QualifiedName fullName, String[] userSegments)
Checks that qualified name starts with user segments- Parameters:
fullName
- checkedQualifiedName
, cannot benull
userSegments
- segments if name is inputed by user,QualifiedName
should start from them, cannot benull
- Returns:
true
ifQualifiedName
starts from user segments,false
otherwise
-
isMetaType
protected boolean isMetaType(org.eclipse.xtext.resource.IEObjectDescription type)
Checks thatIEObjectDescription
corresponding to theType
added by com._1c.g5.v8.dt.bsl.types.extension.IExternalMetaTypesProvider- Parameters:
type
- checkingIEObjectDescription
, cannot benull
- Returns:
true
iftype
corresponding to theType
added by com._1c.g5.v8.dt.bsl.types.extension.IExternalMetaTypesProvider,false
otherwise
-
-