当前位置: 首页>>代码示例>>Java>>正文


Java GMultiplicationExpression类代码示例

本文整理汇总了Java中org.eclipse.gemoc.gexpressions.GMultiplicationExpression的典型用法代码示例。如果您正苦于以下问题:Java GMultiplicationExpression类的具体用法?Java GMultiplicationExpression怎么用?Java GMultiplicationExpression使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GMultiplicationExpression类属于org.eclipse.gemoc.gexpressions包,在下文中一共展示了GMultiplicationExpression类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: caseGMultiplicationExpression

import org.eclipse.gemoc.gexpressions.GMultiplicationExpression; //导入依赖的package包/类
@Override
public Object caseGMultiplicationExpression(GMultiplicationExpression object) {
	Object op1 = this.doSwitch(object.getLeftOperand());
	Object op2 = this.doSwitch(object.getRightOperand());

	switch (object.getOperator()) {
	case MULTIPLICATION:
		return multiplication(op1, op2);
	case DIVISION:
		return division(op1, op2);
	default:
		throw new UnsupportedOperationException(
				"Could not determine the type of the operator: "
						+ object.getOperator());
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:17,代码来源:GExpressionsInterpreter.java

示例2: getText

import org.eclipse.gemoc.gexpressions.GMultiplicationExpression; //导入依赖的package包/类
/**
 * This returns the label text for the adapted class.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public String getText(Object object) {
	GMultiplicationOperator labelValue = ((GMultiplicationExpression)object).getOperator();
	String label = labelValue == null ? null : labelValue.toString();
	return label == null || label.length() == 0 ?
		getString("_UI_GMultiplicationExpression_type") :
		getString("_UI_GMultiplicationExpression_type") + " " + label;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:15,代码来源:GMultiplicationExpressionItemProvider.java

示例3: notifyChanged

import org.eclipse.gemoc.gexpressions.GMultiplicationExpression; //导入依赖的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(GMultiplicationExpression.class)) {
		case GexpressionsPackage.GMULTIPLICATION_EXPRESSION__OPERATOR:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
			return;
	}
	super.notifyChanged(notification);
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:19,代码来源:GMultiplicationExpressionItemProvider.java

示例4: sequence

import org.eclipse.gemoc.gexpressions.GMultiplicationExpression; //导入依赖的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));
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:70,代码来源:AbstractGExpressionsSemanticSequencer.java

示例5: sequence_GMultiplicationExpression

import org.eclipse.gemoc.gexpressions.GMultiplicationExpression; //导入依赖的package包/类
/**
 * Contexts:
 *     GExpression returns GMultiplicationExpression
 *     GOrExpression returns GMultiplicationExpression
 *     GOrExpression.GOrExpression_1_0 returns GMultiplicationExpression
 *     GXorExpression returns GMultiplicationExpression
 *     GXorExpression.GXorExpression_1_0 returns GMultiplicationExpression
 *     GAndExpression returns GMultiplicationExpression
 *     GAndExpression.GAndExpression_1_0 returns GMultiplicationExpression
 *     GEqualityExpression returns GMultiplicationExpression
 *     GEqualityExpression.GEqualityExpression_1_0 returns GMultiplicationExpression
 *     GRelationExpression returns GMultiplicationExpression
 *     GRelationExpression.GRelationExpression_1_0 returns GMultiplicationExpression
 *     GAdditionExpression returns GMultiplicationExpression
 *     GAdditionExpression.GAdditionExpression_1_0 returns GMultiplicationExpression
 *     GMultiplicationExpression returns GMultiplicationExpression
 *     GMultiplicationExpression.GMultiplicationExpression_1_0 returns GMultiplicationExpression
 *
 * Constraint:
 *     (leftOperand=GMultiplicationExpression_GMultiplicationExpression_1_0 operator=GMultiplicationOperator rightOperand=GNegationExpression)
 */
protected void sequence_GMultiplicationExpression(ISerializationContext context, GMultiplicationExpression 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.GMULTIPLICATION_EXPRESSION__OPERATOR) == ValueTransient.YES)
			errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GexpressionsPackage.Literals.GMULTIPLICATION_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.getGMultiplicationExpressionAccess().getGMultiplicationExpressionLeftOperandAction_1_0(), semanticObject.getLeftOperand());
	feeder.accept(grammarAccess.getGMultiplicationExpressionAccess().getOperatorGMultiplicationOperatorEnumRuleCall_1_1_0(), semanticObject.getOperator());
	feeder.accept(grammarAccess.getGMultiplicationExpressionAccess().getRightOperandGNegationExpressionParserRuleCall_1_2_0(), semanticObject.getRightOperand());
	feeder.finish();
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:37,代码来源:AbstractGExpressionsSemanticSequencer.java

示例6: getFixture

import org.eclipse.gemoc.gexpressions.GMultiplicationExpression; //导入依赖的package包/类
/**
 * Returns the fixture for this GMultiplication Expression test case.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
protected GMultiplicationExpression getFixture() {
	return (GMultiplicationExpression)fixture;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:11,代码来源:GMultiplicationExpressionTest.java


注:本文中的org.eclipse.gemoc.gexpressions.GMultiplicationExpression类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。