Class QlFileStructureBuilder
java.lang.Object
com._1c.g5.ides.core.handle.impl.xtext.XtextStructureHelper
com._1c.g5.v8.dt.internal.ql.core.QlFileStructureBuilder
- Direct Known Subclasses:
QlDcsFileStructureBuilder
Builds the structure of an
QlFile
.-
Field Summary
Fields inherited from class com._1c.g5.ides.core.handle.impl.xtext.XtextStructureHelper
helper, linkingHelper, locationProvider, newElements, qualifiedNameConverter, qualifiedNameProvider, resourceServiceProvider
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
QlFileStructureBuilder
(Map<org.eclipse.handly.model.IElement, Object> newElements, org.eclipse.xtext.resource.IResourceServiceProvider resourceServiceProvider) Constructs a new Ql structure builder. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
buildFieldsPart
(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, List<QuerySchemaExpression> exprs) Building handle model for list ofQuerySchemaExpression
For eachQuerySchemaExpression
assigned one node of handle model.protected void
buildForUpdatePart
(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, boolean isUpdate, org.eclipse.emf.common.util.EList<QuerySchemaTableForUpdate> tables) Building part ofQuerySchemaSelectQuery
: part 'FOR UPDATE'protected void
buildFromPart
(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, org.eclipse.emf.common.util.EList<QuerySchemaSource> sources) Building part ofQuerySchemaOperator
: 'FROM' partprotected void
buildGroupIndexPart
(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, org.eclipse.emf.common.util.EList<QuerySchemaExpression> exprs, IFieldQuery.FieldQueryType type) Building part ofQuerySchemaSelectQuery
: part 'INDEX BY' and 'GROUP BY'protected void
buildGroupingSetsPart
(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, List<QuerySchemaGroupingSets> groups) Building part ofQuerySchemaSelectQuery
: part 'GROUP BY GROUPING SETS'protected void
buildHavingWherePart
(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, QuerySchemaExpression expr, IFieldQuery.FieldQueryType type) Building part ofQuerySchemaSelectQuery
: part 'WHERE' and 'HAVING'protected void
buildIndexSetsPart
(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, List<QuerySchemaIndexSets> indexes) Building part ofQuerySchemaSelectQuery
: part 'INDEX BY SETS'protected void
buildIntoPart
(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, AbstractQuerySchemaTable table) Building part ofQuerySchemaOperator
: 'INTO' partprotected void
buildJoinPart
(org.eclipse.handly.model.impl.support.Element source, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, AbstractQuerySchemaQuerySourceJoin abstrJoin) Building handle model for 'JOIN' part of QL languageprotected void
buildLeafField
(org.eclipse.handly.model.impl.support.Element parent, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, org.eclipse.emf.ecore.EObject exprs, String theName) Common mechanism for building handle model for leaf fields in QL languageprotected void
buildPartOfSelectQuery
(SelectQueryImpl select, org.eclipse.handly.model.impl.support.SourceElementBody body, QuerySchemaSelectQuery selectQuery) Building handle model for part of select queryprotected void
buildPartOfSelectQueryOperator
(FieldQueryImpl selectOperator, org.eclipse.handly.model.impl.support.SourceElementBody body, QuerySchemaOperator operator) Building handle model for each operators in select queryprotected void
buildQlModule
(QlFile qlFile, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, QuerySchema query) Building handle model for all queries in QL fileprotected void
buildQlModule
(QuerySchema query, org.eclipse.handly.model.impl.support.Element handle, org.eclipse.handly.model.impl.support.SourceElementBody body) Building handle model ofQuerySchemaDropTableQuery
andQuerySchemaSelectQuery
protected void
buildSelectQuery
(org.eclipse.handly.model.impl.support.Element parent, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, QuerySchemaSelectQuery selectQuery, String alias) Building node in handle model linked with word 'SELECT'protected void
buildTableSourceParameter
(FieldQueryImpl field, org.eclipse.handly.model.impl.support.SourceElementBody bodyField, QuerySchemaTableParameter parameters) Building handle model forQuerySchemaTableParameter
protected AliasComputer
Getting object for computing aliasprotected String
getCommentText
(QuerySchemaOperator operator) Gets comment node content on the same line of the keyword "SELECT" after itprotected String
Get name ofexpr
for handle modelprotected org.eclipse.handly.util.TextRange
getRange()
get current value ofTextRange
protected String
getSelectName
(QuerySchemaOperator operator, QuerySchemaSelectQuery selectQuery) Gets main keyword content of theQuerySchemaOperator
protected String
getSimpleKeyword
(org.eclipse.emf.ecore.EObject expression) Get section name forexpression
.
protected void
setRange
(org.eclipse.handly.util.TextRange range) Methods inherited from class com._1c.g5.ides.core.handle.impl.xtext.XtextStructureHelper
addChild, complete, getCrossRefValue, getCrossRefValues, getFullRange, getFullyQualifiedName, getIdentifyingRange, toTextRange
-
Constructor Details
-
QlFileStructureBuilder
protected QlFileStructureBuilder(Map<org.eclipse.handly.model.IElement, Object> newElements, org.eclipse.xtext.resource.IResourceServiceProvider resourceServiceProvider) Constructs a new Ql structure builder.- Parameters:
newElements
- the map to populate with structure elements (notnull
)resourceServiceProvider
- Xtext'sIResourceServiceProvider
for the language (notnull
)
-
-
Method Details
-
getRange
protected org.eclipse.handly.util.TextRange getRange()get current value ofTextRange
- Returns:
TextRange
-
setRange
protected void setRange(org.eclipse.handly.util.TextRange range) -
buildQlModule
protected void buildQlModule(QlFile qlFile, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, QuerySchema query) Building handle model for all queries in QL file- Parameters:
qlFile
- processingQlFile
, can't benull
parentBody
- parentBody
for creating element, can't benull
query
- processingQuerySchema
, can't benull
-
buildQlModule
protected void buildQlModule(QuerySchema query, org.eclipse.handly.model.impl.support.Element handle, org.eclipse.handly.model.impl.support.SourceElementBody body) Building handle model ofQuerySchemaDropTableQuery
andQuerySchemaSelectQuery
- Parameters:
query
- processingQuerySchema
, can't benull
handle
- actualElement
, can't benull
body
- actualSourceElementBody
, can't benull
-
buildPartOfSelectQuery
protected void buildPartOfSelectQuery(SelectQueryImpl select, org.eclipse.handly.model.impl.support.SourceElementBody body, QuerySchemaSelectQuery selectQuery) Building handle model for part of select query- Parameters:
select
- fillingSelectQueryImpl
, can't benull
body
- actualSourceElementBody
, can't benull
selectQuery
- processingQuerySchemaSelectQuery
, can't benull
-
buildPartOfSelectQueryOperator
protected void buildPartOfSelectQueryOperator(FieldQueryImpl selectOperator, org.eclipse.handly.model.impl.support.SourceElementBody body, QuerySchemaOperator operator) Building handle model for each operators in select query- Parameters:
selectOperator
- fillingFieldQueryImpl
, can't benull
body
- actualSourceElementBody
, can't benull
operator
- processingQuerySchemaOperator
, can't benull
- See Also:
-
buildFieldsPart
protected void buildFieldsPart(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, List<QuerySchemaExpression> exprs) Building handle model for list ofQuerySchemaExpression
For eachQuerySchemaExpression
assigned one node of handle model. All of this nodes have equal parentselect
- Parameters:
select
- actualElement
, can't benull
parentBody
- parentBody
for creating element, can't benull
exprs
- processing expression, can't benull
-
buildIntoPart
protected void buildIntoPart(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, AbstractQuerySchemaTable table) Building part ofQuerySchemaOperator
: 'INTO' part- Parameters:
select
- actualElement
, can't benull
parentBody
- parentBody
for creating element, can't benull
table
- processingAbstractQuerySchemaTable
, can't benull
-
buildFromPart
protected void buildFromPart(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, org.eclipse.emf.common.util.EList<QuerySchemaSource> sources) Building part ofQuerySchemaOperator
: 'FROM' part- Parameters:
select
- actualElement
, can't benull
parentBody
- parentBody
for creating element, can't benull
source
- list of sources in 'FROM', can't benull
-
buildHavingWherePart
protected void buildHavingWherePart(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, QuerySchemaExpression expr, IFieldQuery.FieldQueryType type) Building part ofQuerySchemaSelectQuery
: part 'WHERE' and 'HAVING'- Parameters:
select
- actualElement
, can't benull
parentBody
- parentBody
for creating element, can't benull
expr
- processing expression, can't benull
type
- actualFieldQueryImpl
, can't benull
-
buildGroupIndexPart
protected void buildGroupIndexPart(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, org.eclipse.emf.common.util.EList<QuerySchemaExpression> exprs, IFieldQuery.FieldQueryType type) Building part ofQuerySchemaSelectQuery
: part 'INDEX BY' and 'GROUP BY'- Parameters:
select
- actualElement
, can't benull
parentBody
- parentBody
for creating element, can't benull
exprs
- processing expression, can't benull
type
- actualFieldQueryImpl
, can't benull
-
buildGroupingSetsPart
protected void buildGroupingSetsPart(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, List<QuerySchemaGroupingSets> groups) Building part ofQuerySchemaSelectQuery
: part 'GROUP BY GROUPING SETS'- Parameters:
select
- actualElement
, cannot benull
parentBody
- parentBody
for creating element, cannot benull
groups
- processingQuerySchemaGroupingSets
s, cannot benull
-
buildIndexSetsPart
protected void buildIndexSetsPart(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, List<QuerySchemaIndexSets> indexes) Building part ofQuerySchemaSelectQuery
: part 'INDEX BY SETS'- Parameters:
select
- actualElement
, cannot benull
parentBody
- parentBody
for creating element, cannot benull
groups
- processingQuerySchemaIndexSets
s, cannot benull
-
buildForUpdatePart
protected void buildForUpdatePart(org.eclipse.handly.model.impl.support.Element select, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, boolean isUpdate, org.eclipse.emf.common.util.EList<QuerySchemaTableForUpdate> tables) Building part ofQuerySchemaSelectQuery
: part 'FOR UPDATE'- Parameters:
select
- actualElement
, can't benull
parentBody
- parentBody
for creating element, can't benull
isUpdate
-true
if processing table from section 'FOR UPDATE',false
otherwisetables
- processing tables, can't benull
-
getSimpleKeyword
Get section name forexpression
. Note that
expression
must be first expression in this part
- Parameters:
expression
- processing expression, can't benull
- Returns:
- section name of the expression, can't be
null
-
buildLeafField
protected void buildLeafField(org.eclipse.handly.model.impl.support.Element parent, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, org.eclipse.emf.ecore.EObject exprs, String theName) Common mechanism for building handle model for leaf fields in QL language- Parameters:
parent
- parentElement
element, can't benull
parentBody
- parentBody
for creating element, can't benull
exprs
- processing objecttheName
- actual name of the creating handle element
-
buildSelectQuery
protected void buildSelectQuery(org.eclipse.handly.model.impl.support.Element parent, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, QuerySchemaSelectQuery selectQuery, String alias) Building node in handle model linked with word 'SELECT'- Parameters:
parent
- parentElement
element, can't benull
parentBody
- parentBody
for creating element, can't benull
selectQuery
- processingQuerySchemaSelectQuery
, can't benull
alias
- actual alias of nested query
-
buildTableSourceParameter
protected void buildTableSourceParameter(FieldQueryImpl field, org.eclipse.handly.model.impl.support.SourceElementBody bodyField, QuerySchemaTableParameter parameters) Building handle model forQuerySchemaTableParameter
- Parameters:
field
- fillingFieldQueryImpl
, can't benull
bodyField
- parentBody
for creating element, can't benull
parameters
- table with parameters, can't benull
-
getExpressionName
Get name ofexpr
for handle model- Parameters:
expr
- processing expression- Returns:
- name of the expression, can be
null
-
buildJoinPart
protected void buildJoinPart(org.eclipse.handly.model.impl.support.Element source, org.eclipse.handly.model.impl.support.SourceElementBody parentBody, AbstractQuerySchemaQuerySourceJoin abstrJoin) Building handle model for 'JOIN' part of QL language- Parameters:
source
- parentElement
element, can't benull
parentBody
- parentBody
for creating element, can't benull
abstrJoin
- processingAbstractQuerySchemaQuerySourceJoin
, can't benull
- See Also:
-
getAliasComputer
Getting object for computing alias- Returns:
- object for computing alias
- See Also:
-
getSelectName
Gets main keyword content of theQuerySchemaOperator
- Parameters:
operator
- actualQuerySchemaOperator
, cannot benull
selectQuery
- actualQuerySchemaSelectQuery
corresponding to theoperator
, cannot benull
- Returns:
- main keyword content of the
QuerySchemaOperator
, nevernull
-
getCommentText
Gets comment node content on the same line of the keyword "SELECT" after it- Parameters:
operator
- actualQuerySchemaOperator
for getting comment node, cannot benull
- Returns:
- comment node content on the same line of the keyword "SELECT" after it, never
null
if node was not found empty string will be returned
-