Pass through to provider SequenceRuleLookupSession.use_active_sequence_rule_view
427840
def use_active_sequence_rule_view(self):
        """"""
        self._operable_views['sequence_rule'] = ACTIVE
        # self._get_provider_session('sequence_rule_lookup_session')  # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_active_sequence_rule_view()
            except AttributeError:
                pass
24183
function (aSelectedRulesPlain) {
			// if we persist settings - load any selection presets, else use the default ones
			if (this.model.getProperty("/persistingSettings")) {
				var aPersistedPresets = Storage.getSelectionPresets();
				if (aPersistedPresets) {
					this.model.setProperty("/selectionPresets", aPersistedPresets);
				}
			}

			var aPresets = this.model.getProperty("/selectionPresets"),
				iLastSystemPresetPosition = 0;

			// add System Presets to Rule Presets Popover
			this.getSystemPresets().forEach(function (oSystemPreset) {
				var isFound = aPresets.some(function (oPreset) {
					if (oSystemPreset.id === oPreset.id) {
						if (!oPreset.isModified) {
							var bIsSelected = oPreset.selected;
							oPreset = jQuery.extend({}, oSystemPreset);
							oPreset.selected = bIsSelected;
							if (bIsSelected) {
								SelectionUtils.setSelectedRules(oPreset.selections);
							}
						}
						return true;
					}
				});

				if (!isFound) {
					var mSystemPresetConfig = {
						disableDelete: true,
						isSystemPreset: true
					};
					aPresets.splice(iLastSystemPresetPosition + 1, 0, jQuery.extend(mSystemPresetConfig, oSystemPreset));
				}

				iLastSystemPresetPosition++;
			});

			// find the selected preset
			var oSelectedPreset = null;
			aPresets.some(function (oCurrent) {
				if (oCurrent.selected) {
					oSelectedPreset = oCurrent;
					return true;
				}
			});

			// sync 'My Selections' with current selections
			if (oSelectedPreset.isMySelection) {
				oSelectedPreset.selections = aSelectedRulesPlain;
			}

			// need to init the current preset
			this.model.setProperty("/selectionPresetsCurrent", oSelectedPreset);
		}
1063264
public final void entryRuleOpSingleAssign() throws RecognitionException {
        try {
            // InternalXbaseWithAnnotations.g:234:1: ( ruleOpSingleAssign EOF )
            // InternalXbaseWithAnnotations.g:235:1: ruleOpSingleAssign EOF
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getOpSingleAssignRule()); 
            }
            pushFollow(FOLLOW_1);
            ruleOpSingleAssign();

            state._fsp--;
            if (state.failed) return ;
            if ( state.backtracking==0 ) {
               after(grammarAccess.getOpSingleAssignRule()); 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
450513
void parseBlock( FormattableContainer currentRule ) {
        Operation expr = null;
        String name = null;
        Expression guard = null;
        StringBuilder builder = cachesBuilder;
        boolean wasWhite = false;
        for( ;; ) {
            char ch = reader.read();
            switch( ch ) {
                case '{':
                    String selector;
                    if( name == null ) {
                        selector = trim( builder );
                    } else {
                        selector = name;
                        name = null;
                        throwUnrecognizedInputIfAny( builder, ch );
                    }
                    if( selector.endsWith( "@" ) ) { // selector with variable name like abc@{foo}abc
                        builder.append( selector );
                        builder.append( ch );
                        break;
                    }
                    if( selector.contains( ":extend(" ) ) {
                        selector = LessExtend.addLessExtendsTo( currentRule, reader, selector );
                    }
                    Rule rule = rule( currentRule, selector, expr, guard );
                    currentRule.add( rule );
                    expr = null;
                    guard = null;
                    String[] selectors = rule.getSelectors();
                    for( String sel : selectors ) {
                        currentRule.getMixins().add( sel.trim(), rule );
                    }
                    return;
                case '/':
                    if( !comment( isWhitespace( builder ) ? currentRule : null ) ) {
                        builder.append( ch );
                    }
                    wasWhite = false;
                    break;
                case '\"':
                case '\'':
                    readQuote( ch, builder );
                    wasWhite = false;
                    break;
                case '(':
                    String cmd;
                    if( name == null ) {
                        int idx = builder.lastIndexOf( " when" );
                        if( idx < 0 || (idx + 5 != builder.length() && builder.indexOf( " when " ) < 0) ) {
                            if( isSelector( builder ) || !reader.nextIsMixinParam( true ) ) {
                                builder.append( ch );
                                break;
                            }
                        }
                        name = trim( builder );
                        if( idx < 0 ) {
                            expr = parseParameterList();
                            break;
                        } else {
                            cmd = name.substring( idx + 1 );
                            name = name.substring( 0, idx );
                        }
                    } else {
                        cmd = trim( builder );
                    }
                    char operator;
                    boolean isNot = false;
                    switch( cmd ) {
                        case "when not":
                            isNot = true;
                            //$FALL-THROUGH$
                        case "when":
                            operator = 0;
                            break;
                        case "and not":
                            isNot = true;
                            //$FALL-THROUGH$
                        case "and":
                            operator = '&';
                            break;
                        case ",not":
                        case ", not":
                            isNot = true;
                            //$FALL-THROUGH$
                        case ",":
                            operator = '|';
                            break;
                        default:
                            throw createException( "Unrecognized input: '" + cmd + "'" );
                    }
                    Expression right = parseExpression( (char)0 );
                    ch = read();
                    if( ch != ')' ) {
                        throw createException( "Unrecognized input: '" + ch + "'" );
                    }
                    if( isNot ) {
                        right = new Operation( reader, right, '!' );
                    }
                    guard = ( operator == 0 ) ? right : concat( guard, operator, right );
                    break;
                default:
                    boolean isWhite = Character.isWhitespace( ch );
                    if( isWhite ) {
                        if( builder.length() == 0 ) {
                            break;
                        }
                        if( wasWhite ) {
                            break;
                        } else {
                            builder.append( ' ' );
                            wasWhite = true;
                        }
                    } else {
                        builder.append( ch );
                        wasWhite = false;
                    }
            }
        }
    }
201857
private void parse( FormattableContainer currentRule ) {
        try {
            for( ;; ) {
                int ch = reader.nextBlockMarker();
                switch( ch ) {
                    case -1:
                        return; // end of input reached
                    case ';':
                        parseSemicolon( currentRule );
                        break;
                    case '{':
                        parseBlock( currentRule );
                        break;
                    default:
                        throw createException( "Unrecognized input: '" + reader.getLookAhead() + "'" );
                }
            }
        } catch( LessException ex ) {
            ex.addPosition( reader.getFileName(), reader.getLine(), reader.getColumn() );
            throw ex;
        } catch( RuntimeException ex ) {
            LessException lessEx = new LessException( ex );
            lessEx.addPosition( reader.getFileName(), reader.getLine(), reader.getColumn() );
            throw lessEx;
        }
    }
31466
def use_plenary_sequence_rule_enabler_view(self):
        """"""
        self._object_views['sequence_rule_enabler'] = PLENARY
        # self._get_provider_session('sequence_rule_enabler_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_sequence_rule_enabler_view()
            except AttributeError:
                pass
1058440
public final void entryRuleEnumRule() throws RecognitionException {
        try {
            // InternalXtext.g:1396:1: ( ruleEnumRule EOF )
            // InternalXtext.g:1397:1: ruleEnumRule EOF
            {
             before(grammarAccess.getEnumRuleRule()); 
            pushFollow(FollowSets000.FOLLOW_1);
            ruleEnumRule();

            state._fsp--;

             after(grammarAccess.getEnumRuleRule()); 
            match(input,EOF,FollowSets000.FOLLOW_2); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
11843
def use_comparative_sequence_rule_view(self):
        """"""
        self._object_views['sequence_rule'] = COMPARATIVE
        # self._get_provider_session('sequence_rule_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_sequence_rule_view()
            except AttributeError:
                pass
1318386
private void processRules(RI ruleInput) {
        switch (ruleToResultHandlerMapping) {
            case SPLIT:
                processEachRuleWithEachResultHandler(ruleInput);
                break;
            case JOIN:
                processAllRulesWithEachResultHandler(ruleInput);
                break;
            default:
                LOGGER.error("Unsupported " + MappingStrategy.class.getSimpleName() + ": " +
                        ruleToResultHandlerMapping);
        }
    }
1317514
public final void entryRuleDisjunction() throws RecognitionException {
        try {
            // InternalXtext.g:621:1: ( ruleDisjunction EOF )
            // InternalXtext.g:622:1: ruleDisjunction EOF
            {
             before(grammarAccess.getDisjunctionRule()); 
            pushFollow(FollowSets000.FOLLOW_1);
            ruleDisjunction();

            state._fsp--;

             after(grammarAccess.getDisjunctionRule()); 
            match(input,EOF,FollowSets000.FOLLOW_2); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
667169
public final void entryRuleAction() throws RecognitionException {
        try {
            // InternalXtext.g:471:1: ( ruleAction EOF )
            // InternalXtext.g:472:1: ruleAction EOF
            {
             before(grammarAccess.getActionRule()); 
            pushFollow(FollowSets000.FOLLOW_1);
            ruleAction();

            state._fsp--;

             after(grammarAccess.getActionRule()); 
            match(input,EOF,FollowSets000.FOLLOW_2); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
100072
function (aSelectedRulesPlain) {
			var oPreset = this.model.getProperty("/selectionPresetsCurrent");

			oPreset.selections = aSelectedRulesPlain;

			if (!(oPreset.isModified || oPreset.isMySelection)) {
				oPreset.isModified = true;
				oPreset.title = oPreset.title + " *";
			}

			this.model.setProperty("/selectionPresetsCurrent", oPreset);

			if (PresetsUtils.isPersistingAllowed()) {
				PresetsUtils.persistSelectionPresets();
			}
		}
31389
public final void synpred2_InternalXbaseWithAnnotations_fragment() throws RecognitionException {   
        // InternalXbaseWithAnnotations.g:121:7: ( ( ( ( ruleValidID ) ) '=' ) )
        // InternalXbaseWithAnnotations.g:121:8: ( ( ( ruleValidID ) ) '=' )
        {
        // InternalXbaseWithAnnotations.g:121:8: ( ( ( ruleValidID ) ) '=' )
        // InternalXbaseWithAnnotations.g:122:8: ( ( ruleValidID ) ) '='
        {
        // InternalXbaseWithAnnotations.g:122:8: ( ( ruleValidID ) )
        // InternalXbaseWithAnnotations.g:123:9: ( ruleValidID )
        {
        // InternalXbaseWithAnnotations.g:123:9: ( ruleValidID )
        // InternalXbaseWithAnnotations.g:124:10: ruleValidID
        {
        pushFollow(FOLLOW_8);
        ruleValidID();

        state._fsp--;
        if (state.failed) return ;

        }


        }

        match(input,17,FOLLOW_2); if (state.failed) return ;

        }


        }
    }
250029
public final void entryRuleFeatureCallID() throws RecognitionException {
        try {
            // InternalXbaseWithAnnotations.g:1334:1: ( ruleFeatureCallID EOF )
            // InternalXbaseWithAnnotations.g:1335:1: ruleFeatureCallID EOF
            {
            if ( state.backtracking==0 ) {
               before(grammarAccess.getFeatureCallIDRule()); 
            }
            pushFollow(FOLLOW_1);
            ruleFeatureCallID();

            state._fsp--;
            if (state.failed) return ;
            if ( state.backtracking==0 ) {
               after(grammarAccess.getFeatureCallIDRule()); 
            }
            match(input,EOF,FOLLOW_2); if (state.failed) return ;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
1256762
private void applySeverityAndParamToChange(RuleActivation request, RuleActivationContext context, ActiveRuleChange change) {
    RuleWrapper rule = context.getRule();
    ActiveRuleWrapper activeRule = context.getActiveRule();
    ActiveRuleWrapper parentActiveRule = context.getParentActiveRule();

    // First apply severity
    String severity;
    if (request.isReset()) {
      // load severity from parent profile, else from default values
      severity = firstNonNull(
        parentActiveRule != null ? parentActiveRule.get().getSeverityString() : null,
        rule.get().getSeverityString());
    } else if (context.getRulesProfile().isBuiltIn()) {
      // for builtin quality profiles, the severity from profile, when null use the default severity of the rule
      severity = firstNonNull(request.getSeverity(), rule.get().getSeverityString());
    } else {
      // load severity from request, else keep existing one (if already activated), else from parent, else from default
      severity = firstNonNull(
        request.getSeverity(),
        activeRule == null ? null : activeRule.get().getSeverityString(),
        parentActiveRule != null ? parentActiveRule.get().getSeverityString() : null,
        rule.get().getSeverityString());
    }
    change.setSeverity(severity);

    // Apply param values
    for (RuleParamDto ruleParamDto : rule.getParams()) {
      String paramKey = ruleParamDto.getName();
      String paramValue;
      if (request.isReset()) {
        // load params from parent profile, else from default values
        paramValue = firstNonNull(
          parentActiveRule != null ? parentActiveRule.getParamValue(paramKey) : null,
          rule.getParamDefaultValue(paramKey));
      } else if (context.getRulesProfile().isBuiltIn()) {
        // use the value defined in the profile definition, else the rule default value
        paramValue = firstNonNull(
          context.getRequestedParamValue(request, paramKey),
          rule.getParamDefaultValue(paramKey));
      } else {
        String parentValue = parentActiveRule != null ? parentActiveRule.getParamValue(paramKey) : null;
        String activeRuleValue = activeRule == null ? null : activeRule.getParamValue(paramKey);
        paramValue = context.hasRequestedParamValue(request, paramKey) ?
        // If the request contains the parameter then we're using either value from request, or parent value, or default value
          firstNonNull(
            context.getRequestedParamValue(request, paramKey),
            parentValue,
            rule.getParamDefaultValue(paramKey))
          // If the request doesn't contain the parameter, then we're using either value in DB, or parent value, or default value
          : firstNonNull(
            activeRuleValue,
            parentValue,
            rule.getParamDefaultValue(paramKey));
      }

      change.setParameter(paramKey, validateParam(ruleParamDto, paramValue));
    }
  }
13571
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals)
    private void processAllRulesWithEachResultHandler(RI ruleInput) {
        // For each rule
        List<Object> combinedRulesOutput = new ArrayList<Object>(rules.size());
        for (Rule<RI, RO> rule : rules) {
            // Validate the data and get the rule output
            Object data = rule.validate(ruleInput);

            // Transform the rule output
            if (ruleOutputTransformers != null) {
                for (Transformer transformer : ruleOutputTransformers) {
                    data = transformer.transform(data);
                }
            }

            // Put the transformed rule output in a list
            combinedRulesOutput.add(data);
        }

        // Transform the list of transformed rule output to result handler input
        Object ruleOutput = combinedRulesOutput;
        if (resultHandlerInputTransformers != null) {
            for (Transformer transformer : resultHandlerInputTransformers) {
                ruleOutput = transformer.transform(ruleOutput);
            }
        }
        RHI resultHandlerInput = (RHI) ruleOutput;

        // Process the result handler input with the result handlers
        processResultHandlers(resultHandlerInput);
    }
1085519
protected void afterParserOrEnumRuleCall() {
	ICompositeNode newCurrent = nodeBuilder.compressAndReturnParent(currentNode);
	if(currentNode == lastConsumedNode){
		lastConsumedNode = newCurrent;
	}
		currentNode = newCurrent;
    }