本文整理汇总了Java中org.eclipse.gemoc.gexpressions.GXorExpression类的典型用法代码示例。如果您正苦于以下问题:Java GXorExpression类的具体用法?Java GXorExpression怎么用?Java GXorExpression使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GXorExpression类属于org.eclipse.gemoc.gexpressions包,在下文中一共展示了GXorExpression类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: sequence_GXorExpression
import org.eclipse.gemoc.gexpressions.GXorExpression; //导入依赖的package包/类
/**
* Contexts:
* GExpression returns GXorExpression
* GOrExpression returns GXorExpression
* GOrExpression.GOrExpression_1_0 returns GXorExpression
* GXorExpression returns GXorExpression
* GXorExpression.GXorExpression_1_0 returns GXorExpression
*
* Constraint:
* (leftOperand=GXorExpression_GXorExpression_1_0 operator=GXorOperator rightOperand=GAndExpression)
*/
protected void sequence_GXorExpression(ISerializationContext context, GXorExpression semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, GexpressionsPackage.Literals.GBINARY_OPERATOR_EXPRESSION__LEFT_OPERAND) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GexpressionsPackage.Literals.GBINARY_OPERATOR_EXPRESSION__LEFT_OPERAND));
if (transientValues.isValueTransient(semanticObject, GexpressionsPackage.Literals.GXOR_EXPRESSION__OPERATOR) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GexpressionsPackage.Literals.GXOR_EXPRESSION__OPERATOR));
if (transientValues.isValueTransient(semanticObject, GexpressionsPackage.Literals.GBINARY_OPERATOR_EXPRESSION__RIGHT_OPERAND) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GexpressionsPackage.Literals.GBINARY_OPERATOR_EXPRESSION__RIGHT_OPERAND));
}
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
feeder.accept(grammarAccess.getGXorExpressionAccess().getGXorExpressionLeftOperandAction_1_0(), semanticObject.getLeftOperand());
feeder.accept(grammarAccess.getGXorExpressionAccess().getOperatorGXorOperatorEnumRuleCall_1_1_0(), semanticObject.getOperator());
feeder.accept(grammarAccess.getGXorExpressionAccess().getRightOperandGAndExpressionParserRuleCall_1_2_0(), semanticObject.getRightOperand());
feeder.finish();
}
示例2: getText
import org.eclipse.gemoc.gexpressions.GXorExpression; //导入依赖的package包/类
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
GXorOperator labelValue = ((GXorExpression)object).getOperator();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
getString("_UI_GXorExpression_type") :
getString("_UI_GXorExpression_type") + " " + label;
}
示例3: notifyChanged
import org.eclipse.gemoc.gexpressions.GXorExpression; //导入依赖的package包/类
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(GXorExpression.class)) {
case GexpressionsPackage.GXOR_EXPRESSION__OPERATOR:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}
示例4: caseGXorExpression
import org.eclipse.gemoc.gexpressions.GXorExpression; //导入依赖的package包/类
@Override
public Object caseGXorExpression(GXorExpression object) {
return (Boolean) this.doSwitch(object.getLeftOperand())
^ (Boolean) this.doSwitch(object.getRightOperand());
}
示例5: sequence
import org.eclipse.gemoc.gexpressions.GXorExpression; //导入依赖的package包/类
@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));
}
示例6: getFixture
import org.eclipse.gemoc.gexpressions.GXorExpression; //导入依赖的package包/类
/**
* Returns the fixture for this GXor Expression test case.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected GXorExpression getFixture() {
return (GXorExpression)fixture;
}