Search in sources :

Example 1 with GEqualityExpression

use of org.eclipse.gemoc.gexpressions.GEqualityExpression in project gemoc-studio by eclipse.

the class AbstractGExpressionsSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == GexpressionsPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case GexpressionsPackage.GADDITION_EXPRESSION:
                sequence_GAdditionExpression(context, (GAdditionExpression) semanticObject);
                return;
            case GexpressionsPackage.GAND_EXPRESSION:
                sequence_GAndExpression(context, (GAndExpression) semanticObject);
                return;
            case GexpressionsPackage.GBOOLEAN_EXPRESSION:
                sequence_GBooleanExpression(context, (GBooleanExpression) semanticObject);
                return;
            case GexpressionsPackage.GBRACE_EXPRESSION:
                sequence_GBraceExpression(context, (GBraceExpression) semanticObject);
                return;
            case GexpressionsPackage.GDOUBLE_EXPRESSION:
                sequence_GDoubleExpression(context, (GDoubleExpression) semanticObject);
                return;
            case GexpressionsPackage.GENUM_LITERAL_EXPRESSION:
                sequence_GEnumLiteralExpression(context, (GEnumLiteralExpression) semanticObject);
                return;
            case GexpressionsPackage.GEQUALITY_EXPRESSION:
                sequence_GEqualityExpression(context, (GEqualityExpression) semanticObject);
                return;
            case GexpressionsPackage.GIF_EXPRESSION:
                sequence_GIfExpression(context, (GIfExpression) semanticObject);
                return;
            case GexpressionsPackage.GIMPORT_STATEMENT:
                sequence_GImportStatement(context, (GImportStatement) semanticObject);
                return;
            case GexpressionsPackage.GINTEGER_EXPRESSION:
                sequence_GIntegerExpression(context, (GIntegerExpression) semanticObject);
                return;
            case GexpressionsPackage.GMULTIPLICATION_EXPRESSION:
                sequence_GMultiplicationExpression(context, (GMultiplicationExpression) semanticObject);
                return;
            case GexpressionsPackage.GNAVIGATION_EXPRESSION:
                sequence_GNavigationExpression(context, (GNavigationExpression) semanticObject);
                return;
            case GexpressionsPackage.GNEGATION_EXPRESSION:
                sequence_GNegationExpression(context, (GNegationExpression) semanticObject);
                return;
            case GexpressionsPackage.GOR_EXPRESSION:
                sequence_GOrExpression(context, (GOrExpression) semanticObject);
                return;
            case GexpressionsPackage.GPROGRAM:
                sequence_GProgram(context, (GProgram) semanticObject);
                return;
            case GexpressionsPackage.GREFERENCE_EXPRESSION:
                sequence_GReferenceExpression(context, (GReferenceExpression) semanticObject);
                return;
            case GexpressionsPackage.GRELATION_EXPRESSION:
                sequence_GRelationExpression(context, (GRelationExpression) semanticObject);
                return;
            case GexpressionsPackage.GSTRING_EXPRESSION:
                sequence_GStringExpression(context, (GStringExpression) semanticObject);
                return;
            case GexpressionsPackage.GXOR_EXPRESSION:
                sequence_GXorExpression(context, (GXorExpression) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : GReferenceExpression(org.eclipse.gemoc.gexpressions.GReferenceExpression) ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) GMultiplicationExpression(org.eclipse.gemoc.gexpressions.GMultiplicationExpression) GNegationExpression(org.eclipse.gemoc.gexpressions.GNegationExpression) GProgram(org.eclipse.gemoc.gexpressions.GProgram) GEnumLiteralExpression(org.eclipse.gemoc.gexpressions.GEnumLiteralExpression) GStringExpression(org.eclipse.gemoc.gexpressions.GStringExpression) GDoubleExpression(org.eclipse.gemoc.gexpressions.GDoubleExpression) GNavigationExpression(org.eclipse.gemoc.gexpressions.GNavigationExpression) GAdditionExpression(org.eclipse.gemoc.gexpressions.GAdditionExpression) GBraceExpression(org.eclipse.gemoc.gexpressions.GBraceExpression) EPackage(org.eclipse.emf.ecore.EPackage) GOrExpression(org.eclipse.gemoc.gexpressions.GOrExpression) GXorExpression(org.eclipse.gemoc.gexpressions.GXorExpression) GImportStatement(org.eclipse.gemoc.gexpressions.GImportStatement) GEqualityExpression(org.eclipse.gemoc.gexpressions.GEqualityExpression) GAndExpression(org.eclipse.gemoc.gexpressions.GAndExpression) GIfExpression(org.eclipse.gemoc.gexpressions.GIfExpression) Parameter(org.eclipse.xtext.Parameter) GRelationExpression(org.eclipse.gemoc.gexpressions.GRelationExpression) GIntegerExpression(org.eclipse.gemoc.gexpressions.GIntegerExpression) GBooleanExpression(org.eclipse.gemoc.gexpressions.GBooleanExpression)

Example 2 with GEqualityExpression

use of org.eclipse.gemoc.gexpressions.GEqualityExpression in project gemoc-studio by eclipse.

the class GEqualityExpressionItemProvider method getText.

/**
 * This returns the label text for the adapted class.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getText(Object object) {
    GEqualityOperator labelValue = ((GEqualityExpression) object).getOperator();
    String label = labelValue == null ? null : labelValue.toString();
    return label == null || label.length() == 0 ? getString("_UI_GEqualityExpression_type") : getString("_UI_GEqualityExpression_type") + " " + label;
}
Also used : GEqualityExpression(org.eclipse.gemoc.gexpressions.GEqualityExpression) GEqualityOperator(org.eclipse.gemoc.gexpressions.GEqualityOperator)

Aggregations

GEqualityExpression (org.eclipse.gemoc.gexpressions.GEqualityExpression)2 EPackage (org.eclipse.emf.ecore.EPackage)1 GAdditionExpression (org.eclipse.gemoc.gexpressions.GAdditionExpression)1 GAndExpression (org.eclipse.gemoc.gexpressions.GAndExpression)1 GBooleanExpression (org.eclipse.gemoc.gexpressions.GBooleanExpression)1 GBraceExpression (org.eclipse.gemoc.gexpressions.GBraceExpression)1 GDoubleExpression (org.eclipse.gemoc.gexpressions.GDoubleExpression)1 GEnumLiteralExpression (org.eclipse.gemoc.gexpressions.GEnumLiteralExpression)1 GEqualityOperator (org.eclipse.gemoc.gexpressions.GEqualityOperator)1 GIfExpression (org.eclipse.gemoc.gexpressions.GIfExpression)1 GImportStatement (org.eclipse.gemoc.gexpressions.GImportStatement)1 GIntegerExpression (org.eclipse.gemoc.gexpressions.GIntegerExpression)1 GMultiplicationExpression (org.eclipse.gemoc.gexpressions.GMultiplicationExpression)1 GNavigationExpression (org.eclipse.gemoc.gexpressions.GNavigationExpression)1 GNegationExpression (org.eclipse.gemoc.gexpressions.GNegationExpression)1 GOrExpression (org.eclipse.gemoc.gexpressions.GOrExpression)1 GProgram (org.eclipse.gemoc.gexpressions.GProgram)1 GReferenceExpression (org.eclipse.gemoc.gexpressions.GReferenceExpression)1 GRelationExpression (org.eclipse.gemoc.gexpressions.GRelationExpression)1 GStringExpression (org.eclipse.gemoc.gexpressions.GStringExpression)1