Class QlPredefinedValueProvider


  • public class QlPredefinedValueProvider
    extends Object
    Special provider for predefined value for Ql language.
    Predefined values available from operator 'VALUE'.
    • Field Detail

      • scopeProvider

        @Inject
        protected org.eclipse.xtext.scoping.IScopeProvider scopeProvider
    • Constructor Detail

      • QlPredefinedValueProvider

        public QlPredefinedValueProvider()
    • Method Detail

      • getAllPredefinedValues

        public List<String> getAllPredefinedValues​(org.eclipse.emf.ecore.EObject context)
        Gets all names of allowed predefined values for actual context
        Parameters:
        context - actual context, can't be null
        Returns:
        all names of allowed predefined values for actual context, never null
      • getAllPredefinedValuesByLang

        public List<String[]> getAllPredefinedValuesByLang​(org.eclipse.emf.ecore.EObject context,
                                                           boolean isRu)
        Gets all names of allowed predefined values for actual context and actual script variant
        Parameters:
        context - actual context, can't be null
        isRu - true actual script varian is Russian, false if actual script varian is English
        Returns:
        all names of allowed predefined values divided by parts for actual context and actual script variant, never null
      • computePredefinedValueType

        public TypeDescription computePredefinedValueType​(org.eclipse.emf.ecore.EObject context,
                                                          String predefinedValue)
        Computes type of predefined value by its name
        Parameters:
        context - actual context, can't be null
        predefinedValue - name of the predefined value, can't be null
        Returns:
        TypeDescription with computed type or empty TypeDescription, if type wasn't computed. Never null