Class StringLiteralProposalProviderValueToFormAttr
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.ui.contentassist.stringliteral.AbstractStringLiteralProposalProvider
-
- com._1c.g5.v8.dt.form.ui.bsl.stringliterals.StringLiteralProposalProviderValueToFormAttr
-
- All Implemented Interfaces:
IStringLiteralProposalProvider
,IStringLiteralProposalProviderExtension
,IStringLiteralHyperlinkProvider
,IAvailableStringLiteralProvider
,IAvailableStringLiteralProviderExtension
,IAvailableStringLiteralProviderImportedNamesExtension
public class StringLiteralProposalProviderValueToFormAttr extends AbstractStringLiteralProposalProvider
Compute proposals for bsl method "ValueToFormAttribute"
Extension point "StringLiteralProposals"
Corresponding to enum value "eOCTLogFormProperty" in c++ code for enum type "OutputContentType" in "ITextAssist.h"
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com._1c.g5.v8.dt.bsl.ui.contentassist.stringliteral.IStringLiteralProposalProvider
IStringLiteralProposalProvider.IBslStringLiteralProposalImageProvider
-
-
Field Summary
-
Fields inherited from class com._1c.g5.v8.dt.bsl.ui.contentassist.stringliteral.AbstractStringLiteralProposalProvider
DELIMETER, EXTERNAL_DATA_PROCESSOR_REFERENCE, EXTERNAL_REPORT_REFERENCE, FORM
-
-
Constructor Summary
Constructors Constructor Description StringLiteralProposalProviderValueToFormAttr()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 nameList<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 languageCollection<org.eclipse.xtext.naming.QualifiedName>
getExportedName(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Gets imported names provided by string literalsList<org.eclipse.xtext.resource.IReferenceDescription>
getReferenceDescriptions(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Gets reference descriptions by string literalsboolean
isAppropriate(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context)
Checks context for availability of proposalsboolean
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.-
Methods inherited from class com._1c.g5.v8.dt.bsl.ui.contentassist.stringliteral.AbstractStringLiteralProposalProvider
addQuoteToBegin, checkForTypeCommonMethod, checkForTypeCommonMethod, checkForTypeMdObjectMethod, checkForTypeMethod, checkForTypeMethod, computeProposals, computeProposalsForMdObject, createHyperlinks, createHyperlinks, createHyperlinksForAllReferences, createHyperlinksForFormModule, createProposalsBaseType, createProposalsBySegments, createProposalsBySegments, createProposalsForCommonMdObjects, getActualFeatureByType, getActualMdObjectByType, getAllChildMdObjects, getFilterScope, getReference, getReferenceDescriptionForMdObject, getScope, getTypeOfPreviousElement, hasHyperlinks, isAppropriate, isMetaType, startWith, validate
-
-
-
-
Method Detail
-
isAppropriate
public boolean isAppropriate(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context)
Description copied from interface:IAvailableStringLiteralProviderExtension
Checks context for availability of proposals- 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 proposals available for this context
-
computeProposals
public 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
- Specified by:
computeProposals
in classAbstractStringLiteralProposalProvider
- 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
-
getExportedName
public Collection<org.eclipse.xtext.naming.QualifiedName> getExportedName(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Description copied from interface:IAvailableStringLiteralProviderImportedNamesExtension
Gets imported names provided 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
- Returns:
- found imported names or empty collection if string literal doesn't provide anything imported names
-
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
- Overrides:
isCorrectValue
in classAbstractStringLiteralProposalProvider
- 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
-
getReferenceDescriptions
public List<org.eclipse.xtext.resource.IReferenceDescription> getReferenceDescriptions(org.eclipse.xtext.util.Triple<org.eclipse.emf.ecore.EObject,List<Expression>,Integer> context, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)
Description copied from interface:IAvailableStringLiteralProviderImportedNamesExtension
Gets reference descriptions 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
- Returns:
- reference descriptions or empty list if string literal doesn't provide anything reference descriptions, never
null
-
checkForTypeMdObjectMethod
protected boolean checkForTypeMdObjectMethod(org.eclipse.emf.ecore.EObject object, Collection<String> names, int paramNumber, int expectedParamNumber)
Description copied from class:AbstractStringLiteralProposalProvider
Checks that given object is md object method in Bsl language with defined name- Overrides:
checkForTypeMdObjectMethod
in classAbstractStringLiteralProposalProvider
- 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
-
-