Search in sources :

Example 21 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project mechanoid by robotoworks.

the class SqliteModelSemanticSequencer method sequence_Case.

/**
	 * Constraint:
	 *     (whenExpression=SqlExpression thenExpression=SqlExpression)
	 */
protected void sequence_Case(EObject context, Case semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, SqliteModelPackage.Literals.CASE__WHEN_EXPRESSION) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SqliteModelPackage.Literals.CASE__WHEN_EXPRESSION));
        if (transientValues.isValueTransient(semanticObject, SqliteModelPackage.Literals.CASE__THEN_EXPRESSION) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SqliteModelPackage.Literals.CASE__THEN_EXPRESSION));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getCaseAccess().getWhenExpressionSqlExpressionParserRuleCall_1_0(), semanticObject.getWhenExpression());
    feeder.accept(grammarAccess.getCaseAccess().getThenExpressionSqlExpressionParserRuleCall_3_0(), semanticObject.getThenExpression());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 22 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project mechanoid by robotoworks.

the class SqliteModelSemanticSequencer method sequence_LiteralValue.

/**
	 * Constraint:
	 *     literal='current_time'
	 */
protected void sequence_LiteralValue(EObject context, CurrentTimeLiteral semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, SqliteModelPackage.Literals.CURRENT_TIME_LITERAL__LITERAL) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SqliteModelPackage.Literals.CURRENT_TIME_LITERAL__LITERAL));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getLiteralValueAccess().getLiteralCurrent_timeKeyword_3_1_0(), semanticObject.getLiteral());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 23 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project mechanoid by robotoworks.

the class SqliteModelSemanticSequencer method sequence_AlterTableRenameStatement.

/**
	 * Constraint:
	 *     (table=[TableDefinition|ID] name=ID)
	 */
protected void sequence_AlterTableRenameStatement(EObject context, AlterTableRenameStatement semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, SqliteModelPackage.Literals.TABLE_DEFINITION__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SqliteModelPackage.Literals.TABLE_DEFINITION__NAME));
        if (transientValues.isValueTransient(semanticObject, SqliteModelPackage.Literals.ALTER_TABLE_RENAME_STATEMENT__TABLE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SqliteModelPackage.Literals.ALTER_TABLE_RENAME_STATEMENT__TABLE));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getAlterTableRenameStatementAccess().getTableTableDefinitionIDTerminalRuleCall_3_0_1(), semanticObject.getTable());
    feeder.accept(grammarAccess.getAlterTableRenameStatementAccess().getNameIDTerminalRuleCall_5_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 24 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project mechanoid by robotoworks.

the class SqliteModelSemanticSequencer method sequence_ConfigurationStatement.

/**
	 * Constraint:
	 *     (name=ID uri=ContentUri)
	 */
protected void sequence_ConfigurationStatement(EObject context, ActionStatement semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, SqliteModelPackage.Literals.CONFIGURATION_STATEMENT__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SqliteModelPackage.Literals.CONFIGURATION_STATEMENT__NAME));
        if (transientValues.isValueTransient(semanticObject, SqliteModelPackage.Literals.ACTION_STATEMENT__URI) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SqliteModelPackage.Literals.ACTION_STATEMENT__URI));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getConfigurationStatementAccess().getNameIDTerminalRuleCall_0_2_0(), semanticObject.getName());
    feeder.accept(grammarAccess.getConfigurationStatementAccess().getUriContentUriParserRuleCall_0_3_0(), semanticObject.getUri());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Example 25 with INodesForEObjectProvider

use of org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider in project applause by applause.

the class ApplauseDslSemanticSequencer method sequence_DataSourceCall.

/**
	 * Constraint:
	 *     (datasource=[DataSource|ID] name=ID)
	 */
protected void sequence_DataSourceCall(EObject context, DataSourceCall semanticObject) {
    if (errorAcceptor != null) {
        if (transientValues.isValueTransient(semanticObject, ApplauseDslPackage.Literals.DATA_SOURCE_CALL__DATASOURCE) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ApplauseDslPackage.Literals.DATA_SOURCE_CALL__DATASOURCE));
        if (transientValues.isValueTransient(semanticObject, ApplauseDslPackage.Literals.DATA_SOURCE_CALL__NAME) == ValueTransient.YES)
            errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, ApplauseDslPackage.Literals.DATA_SOURCE_CALL__NAME));
    }
    INodesForEObjectProvider nodes = createNodeProvider(semanticObject);
    SequenceFeeder feeder = createSequencerFeeder(semanticObject, nodes);
    feeder.accept(grammarAccess.getDataSourceCallAccess().getDatasourceDataSourceIDTerminalRuleCall_0_0_1(), semanticObject.getDatasource());
    feeder.accept(grammarAccess.getDataSourceCallAccess().getNameIDTerminalRuleCall_2_0(), semanticObject.getName());
    feeder.finish();
}
Also used : SequenceFeeder(org.eclipse.xtext.serializer.acceptor.SequenceFeeder) INodesForEObjectProvider(org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)

Aggregations

INodesForEObjectProvider (org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider.INodesForEObjectProvider)65 SequenceFeeder (org.eclipse.xtext.serializer.acceptor.SequenceFeeder)64 List (java.util.List)2 AbstractElement (org.eclipse.xtext.AbstractElement)2 IConstraint (org.eclipse.xtext.serializer.analysis.IGrammarConstraintProvider.IConstraint)2 EObject (org.eclipse.emf.ecore.EObject)1 InternalEList (org.eclipse.emf.ecore.util.InternalEList)1 INode (org.eclipse.xtext.nodemodel.INode)1 ISemState (org.eclipse.xtext.serializer.analysis.ISemanticSequencerNfaProvider.ISemState)1 NfaUtil (org.eclipse.xtext.util.formallang.NfaUtil)1