Class QlScopeProvider

  • All Implemented Interfaces:
    org.eclipse.xtext.scoping.impl.IDelegatingScopeProvider, org.eclipse.xtext.scoping.IScopeProvider
    Direct Known Subclasses:
    QlDcsScopeProvider, RightQlScopeProvider

    public class QlScopeProvider
    extends org.eclipse.xtext.scoping.impl.AbstractScopeProvider
    implements org.eclipse.xtext.scoping.impl.IDelegatingScopeProvider
    This class contains custom scoping description. see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping on how and when to use it
    • Constructor Detail

      • QlScopeProvider

        public QlScopeProvider()
    • Method Detail

      • getScope

        public org.eclipse.xtext.scoping.IScope getScope​(org.eclipse.emf.ecore.EObject context,
                                                         org.eclipse.emf.ecore.EReference reference)
        Specified by:
        getScope in interface org.eclipse.xtext.scoping.IScopeProvider
      • getDelegate

        public org.eclipse.xtext.scoping.IScopeProvider getDelegate()
        Specified by:
        getDelegate in interface org.eclipse.xtext.scoping.impl.IDelegatingScopeProvider
      • createScope

        protected org.eclipse.xtext.scoping.IScope createScope​(org.eclipse.xtext.scoping.IScope parent,
                                                               Iterable<org.eclipse.xtext.resource.IEObjectDescription> descrs)
        Created scope for gotten list of IEObjectDescription
        Parameters:
        parent - parent scope, can't be null
        descrs - , list of IEObjectDescription, can't be null
        Returns:
        created IScope, never null
      • createFakeEObjectDescription

        protected List<org.eclipse.xtext.resource.IEObjectDescription> createFakeEObjectDescription​(org.eclipse.emf.ecore.EObject context,
                                                                                                    org.eclipse.emf.ecore.EReference reference)
        Create fake IEObjectDescription This action need for all refers in model will be resolve. In validation stage check all refers and show correct warning or error messages
        Parameters:
        context -
        reference -
        Returns:
        list of IEObjectDescription
      • getInnerFieldsFromSourceSection

        protected Collection<org.eclipse.xtext.resource.IEObjectDescription> getInnerFieldsFromSourceSection​(QuerySchemaOperator operator)
        Gets descriptions of all inner fields from source section of operator
        Parameters:
        operator - QuerySchemaOperator with source section, can't be null
        Returns:
        collection of the IEObjectDescription of inner fields from source section
      • getAllowedDbViewSource

        protected org.eclipse.xtext.scoping.IScope getAllowedDbViewSource​(org.eclipse.emf.ecore.EObject context)
        Gets allowed from source section
        Parameters:
        context - actual context, can't be null
        Returns:
        IScope of allowed DbViewElement, never null
      • getTableParameterFields

        protected Collection<org.eclipse.xtext.resource.IEObjectDescription> getTableParameterFields​(org.eclipse.emf.ecore.EObject context)
        Gets descriptions of all fields for parameter of source table
        Parameters:
        context - context object from parameter of source table, each parameter has own set of allowed fields, cannot be null
        Returns:
        collection of the IEObjectDescription fields for parameter of source table, never null
      • isVirtualTableParameter

        protected boolean isVirtualTableParameter​(org.eclipse.emf.ecore.EObject context)
        Checks that context corresponding to the source table parameter
        Parameters:
        context - context EObject, cannot be null
        Returns:
        true if context corresponding to the source table parameter, false otherwise
      • getDescriptionTempTable

        protected org.eclipse.xtext.scoping.IScope getDescriptionTempTable​(org.eclipse.emf.ecore.EObject context)
        Gets allowed dbView from description temp table
        Parameters:
        context - actual context, can't be null
        Returns:
        IScope of allowed DbViewElement, never null